This feature is well established and works across many devices and browser versions. It’s been available across browsers since April 2021.
An object implementing the CSSConditionRule interface represents a single condition CSS at-rule, which consists of a condition and a statement block.
Three objects derive from CSSConditionRule: CSSMediaRule, CSSContainerRule and CSSSupportsRule.
Inherits properties from its ancestors CSSGroupingRule and CSSRule.
CSSConditionRule.conditionText Read only
Represents the text of the condition of the rule.
Inherits methods from its ancestors CSSGroupingRule and CSSRule.
| Desktop | Mobile | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Chrome | Edge | Firefox | Opera | Safari | Chrome Android | Firefox for Android | Opera Android | Safari on IOS | Samsung Internet | WebView Android | WebView on iOS | |
CSSConditionRule |
56 | 12 | 20 | 43 | 14.1 | 56 | 20 | 43 | 14.5 | 6.0 | 56 | 14.5 |
conditionText |
56 | 12 | 20 | 43 | 14.1 | 56 | 20 | 43 | 14.5 | 6.0 | 56 | 14.5 |
© 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/CSSConditionRule