CSSPageRule

  • Revision slug: DOM/CSSPageRule
  • Revision title: CSSPageRule
  • Revision id: 337339
  • Created:
  • Creator: teoli
  • Is current revision? No
  • Comment

Revision Content

{{ CSSOMRef() }}

CSSPageRule is an object representing a single CSS page rule. It implements the {{domxref("CSSRule")}} interfacewith 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 }}
{{domxref("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() }}
Derives from {{domxref("CSSConditionRule")}} {{experimental_inline()}} {{ CompatUnknown() }} {{CompatNo}} {{ CompatUnknown() }} {{ CompatUnknown() }} {{ CompatUnknown() }}

See also

  • {{ domxref("CSSRule") }}

Revision Source

<p>{{ CSSOMRef() }}</p>
<p><strong><code>CSSPageRule</code></strong> is an object representing a single CSS page rule. It implements the {{domxref("CSSRule")}} interfacewith a type value of <code>6</code> (<code>CSSRule.PAGE_RULE</code>).</p>
<h2 id="Syntax">Syntax</h2>
<p>The syntax is described using the <a href="http://dev.w3.org/2006/webapi/WebIDL/" title="http://dev.w3.org/2006/webapi/WebIDL/">WebIDL</a> format.</p>
<pre>
interface CSSPageRule : CSSRule {
&nbsp;&nbsp;&nbsp; attribute DOMString selectorText;
&nbsp;&nbsp;&nbsp; readonly attribute CSSStyleDeclaration style;
};
</pre>
<h2 id="Properties" name="Properties">Properties</h2>
<p>As a {{ domxref("CSSRule") }}, <code>CSSPageRule</code> also implements the properties of these interfaces. It has the following specific propert<code>y:</code></p>
<dl>
  <dt>
    <code>selectorText</code></dt>
  <dd>
    Represents the text of the page selector associated with the at-rule.</dd>
  <dt>
    <code>style</code> {{readonlyinline()}}</dt>
  <dd>
    Returns the declaration block associated with the at-rule.</dd>
</dl>
<h2 id="Methods" name="Methods">Methods</h2>
<p>As a {{ domxref("CSSRule") }}, <code>CSSPageRule</code> also implements the methods of that interface. It has no specific methods.</p>
<h2 id="Specification" name="Specification">Specification</h2>
<table class="standard-table">
  <thead>
    <tr>
      <th scope="col">Specification</th>
      <th scope="col">Status</th>
      <th scope="col">Comment</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td>{{ SpecName('CSSOM', '#the-csspagerule-interface', 'CSSPageRule') }}</td>
      <td>{{ Spec2('CSSOM') }}</td>
      <td>No changes from {{SpecName('DOM2 Style')}}</td>
    </tr>
    <tr>
      <td>{{SpecName('DOM2 Style', 'css.html#CSS-CSSPageRule', 'CSSPageRule') }}</td>
      <td>{{ Spec2('DOM2 Style') }}</td>
      <td>&nbsp;</td>
    </tr>
  </tbody>
</table>
<h2 id="Browser_compatibility">Browser compatibility</h2>
<p>{{ CompatibilityTable() }}</p>
<div id="compat-desktop">
  <table class="compat-table">
    <tbody>
      <tr>
        <th>Feature</th>
        <th>Chrome</th>
        <th>Firefox (Gecko)</th>
        <th>Internet Explorer</th>
        <th>Opera</th>
        <th>Safari (WebKit)</th>
      </tr>
      <tr>
        <td>Basic support</td>
        <td>{{ CompatVersionUnknown }}</td>
        <td>{{ CompatGeckoDesktop("19") }}</td>
        <td>{{ CompatVersionUnknown }}</td>
        <td>{{ CompatVersionUnknown }}</td>
        <td>{{ CompatVersionUnknown }}</td>
      </tr>
      <tr>
        <td>{{domxref("selectorText")}}</td>
        <td>{{ CompatVersionUnknown }}</td>
        <td>{{CompatNo}}</td>
        <td>{{ CompatVersionUnknown }}</td>
        <td>{{ CompatVersionUnknown }}</td>
        <td>{{ CompatVersionUnknown }}</td>
      </tr>
    </tbody>
  </table>
</div>
<div id="compat-mobile">
  <table class="compat-table">
    <tbody>
      <tr>
        <th>Feature</th>
        <th>Android</th>
        <th>Firefox Mobile (Gecko)</th>
        <th>IE&nbsp;Phone</th>
        <th>Opera Mobile</th>
        <th>Safari Mobile</th>
      </tr>
      <tr>
        <td>Basic support</td>
        <td>{{ CompatUnknown() }}</td>
        <td>{{ CompatGeckoMobile("19") }}</td>
        <td>{{ CompatUnknown() }}</td>
        <td>{{ CompatUnknown() }}</td>
        <td>{{ CompatUnknown() }}</td>
      </tr>
      <tr>
        <td>Derives from {{domxref("CSSConditionRule")}} {{experimental_inline()}}</td>
        <td>{{ CompatUnknown() }}</td>
        <td>{{CompatNo}}</td>
        <td>{{ CompatUnknown() }}</td>
        <td>{{ CompatUnknown() }}</td>
        <td>{{ CompatUnknown() }}</td>
      </tr>
    </tbody>
  </table>
</div>
<h2 id="See_also">See also</h2>
<ul>
  <li>{{ domxref("CSSRule") }}</li>
</ul>
Revert to this revision