Baseline Widely available
The read-only conditionText
property of the CSSConditionRule
interface returns or sets the text of the CSS rule.
A string.
ExamplesThe following example demonstrates reading the value of conditionText
on a CSSMediaRule
which implements the CSSConditionRule
interface.
@media (width >= 500px) {
body {
color: blue;
}
}
const targetRule = document.styleSheets[0].cssRules[0];
console.log(targetRule.conditionText); // "(width >= 500px)"
Specifications Browser compatibility See also
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4