StyleSheet
An object implementing the StyleSheet interface represents a single style sheet. CSS style sheets will further implement the more specialized CSSStyleSheet interface.
Properties
StyleSheet.disabled-
Is a boolean value representing whether the current stylesheet has been applied or not.
-
StyleSheet.hrefRead only -
Returns a
DOMStringrepresenting the location of the stylesheet. -
StyleSheet.mediaRead only -
Returns a
MediaListrepresenting the intended destination medium for style information. -
StyleSheet.ownerNodeRead only -
Returns a
Nodeassociating this style sheet with the current document. -
StyleSheet.parentStyleSheetRead only -
Returns a
StyleSheetincluding this one, if any; returnsnullif there aren't any. -
StyleSheet.titleRead only -
Returns a
DOMStringrepresenting the advisory title of the current style sheet. -
StyleSheet.typeRead only -
Returns a
DOMStringrepresenting the style sheet language for this style sheet.
Specifications
Browser compatibility
| Desktop | Mobile | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Chrome | Edge | Firefox | Internet Explorer | Opera | Safari | WebView Android | Chrome Android | Firefox for Android | Opera Android | Safari on IOS | Samsung Internet | |
StyleSheet |
1 |
12 |
1 |
9 |
Yes |
1 |
Yes |
Yes |
4 |
Yes |
1 |
Yes |
disabled |
1 |
12 |
1 |
9 |
Yes |
1 |
Yes |
Yes |
4 |
Yes |
1 |
Yes |
href |
1 |
12 |
1 |
9 |
Yes |
1 |
Yes |
Yes |
4 |
Yes |
1 |
Yes |
media |
1 |
12 |
1 |
9 |
Yes |
1 |
Yes |
Yes |
4 |
Yes |
1 |
Yes |
ownerNode |
1 |
12 |
1 |
9 |
Yes |
1 |
Yes |
Yes |
4 |
Yes |
1 |
Yes |
parentStyleSheet |
1 |
12 |
1 |
9 |
Yes |
1 |
Yes |
Yes |
4 |
Yes |
1 |
Yes |
title |
1 |
12 |
1 |
9 |
Yes |
1 |
Yes |
Yes |
4 |
Yes |
1 |
Yes |
type |
1 |
12 |
1 |
9 |
Yes |
1 |
Yes |
Yes |
4 |
Yes |
1 |
Yes |
See also
© 2005–2021 MDN contributors.
Licensed under the Creative Commons Attribution-ShareAlike License v2.5 or later.
https://developer.mozilla.org/en-US/docs/Web/API/StyleSheet