Represents an @region rule in a CSS style sheet, which applies styles to fragments of content that flow into a CSS region.
PropertiesNo properties.
MethodsNo methods.
EventsNo events.
Inherited from CSSRule Propertiestype
:
No methods.
EventsNo events.
ExamplesStarting with this CSS…
@region div.region {
p {
color: #fff;
background-color: #000;
}
}
Narrow the scope of the first rule within the @region to the first paragraph, and modify its background color
rule = document.styleSheets[0].cssRules[0];
rule.cssRules[0].selectorText = 'article > p:first-of-type';
rule.cssRules[0].style.backgroundColor = '#777';
console.log(rule.cssRules[0].cssText);
console.log(rule.cssText);
The cssText above now dynamically reflects these altered values:
@region div.region {
p:first-of-type {
color: #fff;
background-color: #777;
}
}
Related specifications
CSSRegionStyleRule
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