| [ Web Proxy ] |
| Viewing: https://developer.mozilla.org/en-US/docs/Web/API/CSSStyleSheet/rules | [Back] [Original] |
Get to know MDN better
Avoid using this feature in new projects. This feature may be a candidate for removal from web standards or browsers.
rules is a deprecated
legacy property of the CSSStyleSheet interface. Functionally
identical to the preferred cssRules property,
it provides access to a live-updating list of the CSS rules comprising the
stylesheet.
Note:
As a legacy property, you should not use rules and
should instead use the preferred cssRules.
While rules is unlikely to be removed soon, its availability is not as
widespread and using it will result in compatibility problems for your site or app.
A live-updating CSSRuleList containing each of the CSS rules making up
the stylesheet. Each entry in the rule list is a CSSRule object
describing one rule making up the stylesheet.
| Specification |
|---|
| CSS Object Model (CSSOM) # dom-cssstylesheet-rules |
This page was last modified on Jul 26, 2024 by MDN contributors.
CSSStyleSheetCSSCSSConditionRuleCSSFontFeatureValuesMapCSSFontFeatureValuesRuleCSSFontPaletteValuesRuleCSSFunctionDeclarationsCSSFunctionDescriptorsCSSFunctionRuleCSSGroupingRuleCSSImportRuleCSSKeyframeRuleCSSKeyframesRuleCSSLayerBlockRuleCSSLayerStatementRuleCSSMediaRuleCSSNamespaceRuleCSSPageDescriptorsCSSPageRuleCSSPropertyRuleCSSRuleCSSRuleListCSSStartingStyleRuleCSSStyleDeclarationCSSStylePropertiesCSSStyleRuleCSSSupportsRuleCaretPositionMediaListMediaQueryListScreenStyleSheetStyleSheetListYour blueprint for a better internet.
Portions of this content are 19982026 by individual mozilla.org contributors. Content available under a Creative Commons license.
| Web Proxy Viewer | New URL | Original Page |