CSSScopeRule

Baseline 2025
Newly available

Since December 2025, this feature works across the latest devices and browser versions. This feature might not work in older devices or browsers.

The CSSScopeRule interface of the CSS Object Model represents a CSS @scope at-rule.

CSSRule CSSGroupingRule CSSScopeRule

Instance properties

Inherits properties from its ancestors CSSGroupingRule and CSSRule.

end

Returns a string containing the value of the @scope at-rule's scope limit.

start

Returns a string containing the value of the @scope at-rule's scope root.

Instance methods

Inherits methods from its ancestors CSSGroupingRule and CSSRule.

Examples

Accessing @scope information in JavaScript

Assuming the following is the only stylesheet attached to a document:

css
@scope (.outer) to (.inner) {
  :scope {
    background: yellow;
  }
}

The following JavaScript could be used to access information about the contained @scope block:

js
const scopeBlock = document.styleSheets[0].cssRules[0];

console.log(scopeBlock.start); // Returns ".outer"
console.log(scopeBlock.end); // Returns ".inner"

Specifications

Specification
CSS Cascading and Inheritance Level 6
# cssscoperule

Browser compatibility

desktop mobile
Chrome
Edge
Firefox
Opera
Safari
Chrome Android
Firefox for Android
Opera Android
Safari on iOS
Samsung Internet
WebView Android
WebView on iOS
CSSScopeRule
Chrome – Full support
Chrome 118 (Release date: 2023-10-10)
footnote Full support
Edge – Full support
Edge 118 (Release date: 2023-10-13)
footnote Full support
Firefox – Full support
Firefox 146 (Release date: 2025-12-09)
footnote Full support
Opera – Full support
Opera 104 (Release date: 2023-10-23)
footnote Full support
Safari – Full support
Safari 17.4 (Release date: 2024-03-05)
footnote Full support
Chrome Android – Full support
Chrome Android 118 (Release date: 2023-10-10)
footnote Full support
Firefox for Android – Full support
Firefox for Android 146 (Release date: 2025-12-09)
footnote Full support
Opera Android – Full support
Opera Android 79 (Release date: 2023-12-06)
footnote Full support
Safari on iOS – Full support
Safari on iOS 17.4 (Release date: 2024-03-05)
footnote Full support
Samsung Internet – Full support
Samsung Internet 25 (Release date: 2024-04-24)
footnote Full support
WebView Android – Full support
WebView Android 118 (Release date: 2023-10-10)
footnote Full support
WebView on iOS – Full support
WebView on iOS 17.4 (Release date: 2024-03-05)
footnote Full support
end
Chrome – Full support
Chrome 118 (Release date: 2023-10-10)
footnote Full support
Edge – Full support
Edge 118 (Release date: 2023-10-13)
footnote Full support
Firefox – Full support
Firefox 146 (Release date: 2025-12-09)
footnote Full support
Opera – Full support
Opera 104 (Release date: 2023-10-23)
footnote Full support
Safari – Full support
Safari 17.4 (Release date: 2024-03-05)
footnote Full support
Chrome Android – Full support
Chrome Android 118 (Release date: 2023-10-10)
footnote Full support
Firefox for Android – Full support
Firefox for Android 146 (Release date: 2025-12-09)
footnote Full support
Opera Android – Full support
Opera Android 79 (Release date: 2023-12-06)
footnote Full support
Safari on iOS – Full support
Safari on iOS 17.4 (Release date: 2024-03-05)
footnote Full support
Samsung Internet – Full support
Samsung Internet 25 (Release date: 2024-04-24)
footnote Full support
WebView Android – Full support
WebView Android 118 (Release date: 2023-10-10)
footnote Full support
WebView on iOS – Full support
WebView on iOS 17.4 (Release date: 2024-03-05)
footnote Full support
start
Chrome – Full support
Chrome 118 (Release date: 2023-10-10)
footnote Full support
Edge – Full support
Edge 118 (Release date: 2023-10-13)
footnote Full support
Firefox – Full support
Firefox 146 (Release date: 2025-12-09)
footnote Full support
Opera – Full support
Opera 104 (Release date: 2023-10-23)
footnote Full support
Safari – Full support
Safari 17.4 (Release date: 2024-03-05)
footnote Full support
Chrome Android – Full support
Chrome Android 118 (Release date: 2023-10-10)
footnote Full support
Firefox for Android – Full support
Firefox for Android 146 (Release date: 2025-12-09)
footnote Full support
Opera Android – Full support
Opera Android 79 (Release date: 2023-12-06)
footnote Full support
Safari on iOS – Full support
Safari on iOS 17.4 (Release date: 2024-03-05)
footnote Full support
Samsung Internet – Full support
Samsung Internet 25 (Release date: 2024-04-24)
footnote Full support
WebView Android – Full support
WebView Android 118 (Release date: 2023-10-10)
footnote Full support
WebView on iOS – Full support
WebView on iOS 17.4 (Release date: 2024-03-05)
footnote Full support

Legend

Tip: you can click/tap on a cell for more information.

Full support
Full support

See also