---
title: "StyleSheet | JavaScript maps SDK"
description: "Documentation for MapTiler SDK"
---

> For AI agents: a documentation index is available at [/llms.txt](https://docs.maptiler.com/llms.txt). Markdown versions of all pages are available by appending .md to any URL.

# Interface StyleSheet

An object implementing the **`StyleSheet`** interface represents a single style sheet. CSS style sheets will further implement the more specialized CSSStyleSheet interface.

[MDN Reference](https://developer.mozilla.org/docs/Web/API/StyleSheet)

interface StyleSheet {  
    [disabled](#disabled): boolean;  
    [href](#href): string | null;  
    [ownerNode](#ownernode): [Element](https://docs.maptiler.com/sdk-js/api-reference/interfaces/Externals.Element/) | [ProcessingInstruction](https://docs.maptiler.com/sdk-js/api-reference/interfaces/Externals.ProcessingInstruction/) | null;  
    [parentStyleSheet](#parentstylesheet): [CSSStyleSheet](https://docs.maptiler.com/sdk-js/api-reference/interfaces/Externals.CSSStyleSheet/) | null;  
    [title](#title): string | null;  
    [type](#type): string;  
    get [media](#mediamedia)(): [MediaList](https://docs.maptiler.com/sdk-js/api-reference/interfaces/Externals.MediaList/);  
    set [media](#mediamedia-1)(mediaText: string): void;  
}

#### Hierarchy ([View Summary](https://docs.maptiler.com/sdk-js/api-reference/hierarchy/#Externals.StyleSheet))

-   StyleSheet
    -   [CSSStyleSheet](https://docs.maptiler.com/sdk-js/api-reference/interfaces/Externals.CSSStyleSheet/)

##### Index

### Properties[](#properties)

[disabled](#disabled) [href](#href) [ownerNode](#ownernode) [parentStyleSheet](#parentstylesheet) [title](#title) [type](#type)

### Accessors[](#accessors)

[media](#media)

## Properties[](#properties-1)

### disabled[](#disabled)

disabled: boolean

The **`disabled`** property of the StyleSheet interface determines whether the style sheet is prevented from applying to the document.

[MDN Reference](https://developer.mozilla.org/docs/Web/API/StyleSheet/disabled)

### `Readonly`href[](#href)

href: string | null

The **`href`** property of the StyleSheet interface returns the location of the style sheet.

[MDN Reference](https://developer.mozilla.org/docs/Web/API/StyleSheet/href)

### `Readonly`ownerNode[](#ownernode)

ownerNode: [Element](https://docs.maptiler.com/sdk-js/api-reference/interfaces/Externals.Element/) | [ProcessingInstruction](https://docs.maptiler.com/sdk-js/api-reference/interfaces/Externals.ProcessingInstruction/) | null

The **`ownerNode`** property of the StyleSheet interface returns the node that associates this style sheet with the document.

[MDN Reference](https://developer.mozilla.org/docs/Web/API/StyleSheet/ownerNode)

### `Readonly`parentStyleSheet[](#parentstylesheet)

parentStyleSheet: [CSSStyleSheet](https://docs.maptiler.com/sdk-js/api-reference/interfaces/Externals.CSSStyleSheet/) | null

The **`parentStyleSheet`** property of the StyleSheet interface returns the style sheet, if any, that is including the given style sheet.

[MDN Reference](https://developer.mozilla.org/docs/Web/API/StyleSheet/parentStyleSheet)

### `Readonly`title[](#title)

title: string | null

The **`title`** property of the StyleSheet interface returns the advisory title of the current style sheet.

[MDN Reference](https://developer.mozilla.org/docs/Web/API/StyleSheet/title)

### `Readonly`type[](#type)

type: string

The **`type`** property of the StyleSheet interface specifies the style sheet language for the given style sheet.

[MDN Reference](https://developer.mozilla.org/docs/Web/API/StyleSheet/type)

## Accessors[](#accessors-1)

### media[](#media)

-   get media(): [MediaList](https://docs.maptiler.com/sdk-js/api-reference/interfaces/Externals.MediaList/)
    
    The read-only **`media`** property of the StyleSheet interface contains a MediaList object representing the intended destination media for style information.
    
    [MDN Reference](https://developer.mozilla.org/docs/Web/API/StyleSheet/media)
    
    #### Returns [MediaList](https://docs.maptiler.com/sdk-js/api-reference/interfaces/Externals.MediaList/)
    
-   set media(mediaText: string): void
    
    #### Parameters
    
    -   mediaText: string
    
    #### Returns void
