{{ CSSOMRef() }}
CSSPageRule
is an object representing a single CSS {{cssxref("@page")}} rule. It implements the {{domxref("CSSRule")}} interface with a type value of 6
(CSSRule.PAGE_RULE
).
Syntax
The syntax is described using the WebIDL format.
interface CSSPageRule : CSSRule { attribute DOMString selectorText; readonly attribute CSSStyleDeclaration style; };
Properties
As a {{ domxref("CSSRule") }}, CSSPageRule
also implements the properties of these interfaces. It has the following specific property:
-
selectorText
- Represents the text of the page selector associated with the at-rule.
-
style
{{readonlyinline()}} - Returns the declaration block associated with the at-rule.
Methods
As a {{ domxref("CSSRule") }}, CSSPageRule
also implements the methods of that interface. It has no specific methods.
Specification
Specification | Status | Comment |
---|---|---|
{{ SpecName('CSSOM', '#the-csspagerule-interface', 'CSSPageRule') }} | {{ Spec2('CSSOM') }} | No changes from {{SpecName('DOM2 Style')}} |
{{SpecName('DOM2 Style', 'css.html#CSS-CSSPageRule', 'CSSPageRule') }} | {{ Spec2('DOM2 Style') }} |
Browser compatibility
{{ CompatibilityTable() }}
Feature | Chrome | Firefox (Gecko) | Internet Explorer | Opera | Safari (WebKit) |
---|---|---|---|---|---|
Basic support | {{ CompatVersionUnknown }} | {{ CompatGeckoDesktop("19") }} | {{ CompatVersionUnknown }} | {{ CompatVersionUnknown }} | {{ CompatVersionUnknown }} |
selectorText |
{{ CompatVersionUnknown }} | {{CompatNo}} | {{ CompatVersionUnknown }} | {{ CompatVersionUnknown }} | {{ CompatVersionUnknown }} |
Feature | Android | Firefox Mobile (Gecko) | IE Phone | Opera Mobile | Safari Mobile |
---|---|---|---|---|---|
Basic support | {{ CompatUnknown() }} | {{ CompatGeckoMobile("19") }} | {{ CompatUnknown() }} | {{ CompatUnknown() }} | {{ CompatUnknown() }} |
selectorText |
{{ CompatUnknown() }} | {{CompatNo}} | {{ CompatUnknown() }} | {{ CompatUnknown() }} | {{ CompatUnknown() }} |
See also
- {{CSSOM}}