The style read-only property of the CSSPageRule interface returns a CSSStyleDeclaration object. This represents an object that is a CSS declaration block, and exposes style information and various style-related methods and properties.
The style read-only property of the CSSPageRule interface returns a CSSStyleDeclaration object. This represents an object that is a CSS declaration block, and exposes style information and various style-related methods and properties.
A CSSStyleDeclaration object, which represents a CSS declaration block with the following properties:
Unset.
The declared declarations in the rule, in the order they were specified, shorthand properties expanded to longhands.
The context object, which is an alias for this.
Null.
The stylesheet includes a @page rule. Getting a list of rules, then returning the value of the style property will return a CSSStyleDeclaration object.
css
@page { margin: 1cm; }
js
let myRules = document.styleSheets[0].cssRules; console.log(myRules[0].style); // returns a CSSStyleDeclaration object
| Specification | 
|---|
| CSS Object Model (CSSOM)  # dom-cssgroupingrule-style  | 
| Desktop | Mobile | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Chrome | Edge | Firefox | Internet Explorer | Opera | Safari | WebView Android | Chrome Android | Firefox for Android | Opera Android | Safari on IOS | Samsung Internet | |
style | 
1 | 12 | 19 | 9 | ≤12.1 | 3 | 4.4 | 18 | 19 | ≤12.1 | 1 | 1.0 | 
    © 2005–2023 MDN contributors.
Licensed under the Creative Commons Attribution-ShareAlike License v2.5 or later.
    https://developer.mozilla.org/en-US/docs/Web/API/CSSPageRule/style