This feature is well established and works across many devices and browser versions. It’s been available across browsers since April 2021.
The CSSGroupingRule interface of the CSS Object Model represents any CSS at-rule that contains other rules nested within it.
This interface also inherits properties from CSSRule.
CSSGroupingRule.cssRules Read only
Returns a CSSRuleList of the CSS rules in the media rule.
This interface also inherits methods from CSSRule.
CSSGroupingRule.deleteRuleDeletes a rule from the style sheet.
CSSGroupingRule.insertRuleInserts a new style rule into the current style sheet.
| Desktop | Mobile | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Chrome | Edge | Firefox | Opera | Safari | Chrome Android | Firefox for Android | Opera Android | Safari on IOS | Samsung Internet | WebView Android | WebView on iOS | |
CSSGroupingRule |
45 | 12 | 20 | 32 | 14.13–14.1TheCSSGroupingRule interface itself is not present, but many of the methods are available on various interfaces such as the CSSMediaRule and CSSPageRule interfaces. |
45 | 20 | 32 | 14.52–14.5TheCSSGroupingRule interface itself is not present, but many of the methods are available on various interfaces such as the CSSMediaRule and CSSPageRule interfaces. |
5.0 | 45 | 14.52–14.5TheCSSGroupingRule interface itself is not present, but many of the methods are available on various interfaces such as the CSSMediaRule and CSSPageRule interfaces. |
cssRules |
45 | 12 | 20 | 32 | 3 | 45 | 20 | 32 | 2 | 5.0 | 45 | 2 |
deleteRule |
45 | 12 | 20 | 32 | 3 | 45 | 20 | 32 | 2 | 5.0 | 45 | 2 |
insertRule |
45 | 12 | 20 | 32 | 3 | 45 | 20 | 32 | 2 | 5.0 | 45 | 2 |
© 2005–2025 MDN contributors.
Licensed under the Creative Commons Attribution-ShareAlike License v2.5 or later.
https://developer.mozilla.org/en-US/docs/Web/API/CSSGroupingRule