mozilla

Revision 336839 of CSSMediaRule

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

Revision Content

{{ CSSOMRef() }}

An object representing a single CSS media rule. CSSMediaRule implements the CSSRule interface.

Properties

cssRules
Returns a CSSRuleList of the CSS rules in the media rule.
media
Specifies the intended destination medium for style information.

Methods

deleteRule
Deletes a rule from the style sheet.
insertRule
Inserts a new style rule into the current style sheet.

Specification

Specification Status Comment
{{ SpecName('CSS3 Conditional', '#the-cssmediarule-interface', 'CSSMediaRule') }} {{ Spec2('CSS3 Conditional')}} Make it derived from the CSSConditionRule.
{{ SpecName('CSSOM', '#the-cssmediarule-interface', 'CSSMediaRule') }} {{ Spec2('CSSOM') }} No changes from {{SpecName('DOM2 Style')}}
{{SpecName('DOM2 Style', 'css.html#CSS-CSSMediaRule', 'CSSMediaRule') }} {{ Spec2('DOM2 Style') }}  

See also

  • {{ domxref("CSSRule") }}

Revision Source

<p>{{ CSSOMRef() }}</p>
<p>An object representing a single CSS media rule.&nbsp;<code>CSSMediaRule</code>&nbsp;implements the&nbsp;<code><a href="/en/DOM/CSSRule" rel="custom">CSSRule</a></code>&nbsp;interface.</p>
<h2 id="Properties" name="Properties">Properties</h2>
<dl>
  <dt id="cssRules">
    <code>cssRules</code></dt>
  <dd>
    Returns a <code><a href="/en/DOM/CSSRuleList" title="en/DOM/CSSRuleList">CSSRuleList</a></code> of the CSS rules in the media rule.</dd>
  <dt>
    <code>media</code></dt>
  <dd>
    Specifies the intended destination medium for style information.</dd>
</dl>
<h2 id="Methods" name="Methods">Methods</h2>
<dl>
  <dt id="deleteRule">
    <code>deleteRule</code></dt>
  <dd>
    Deletes a rule from the style sheet.</dd>
  <dt id="insertRule">
    <code>insertRule</code></dt>
  <dd>
    Inserts a new style rule into the current style sheet.</dd>
</dl>
<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('CSS3 Conditional', '#the-cssmediarule-interface', 'CSSMediaRule') }}</td>
      <td>{{ Spec2('CSS3 Conditional')}}</td>
      <td>Make it derived from the <code>CSSConditionRule</code>.</td>
    </tr>
    <tr>
      <td>{{ SpecName('CSSOM', '#the-cssmediarule-interface', 'CSSMediaRule') }}</td>
      <td>{{ Spec2('CSSOM') }}</td>
      <td>No changes from {{SpecName('DOM2 Style')}}</td>
    </tr>
    <tr>
      <td>{{SpecName('DOM2 Style', 'css.html#CSS-CSSMediaRule', 'CSSMediaRule') }}</td>
      <td>{{ Spec2('DOM2 Style') }}</td>
      <td>&nbsp;</td>
    </tr>
  </tbody>
</table>
<h2 id="See_also">See also</h2>
<ul>
  <li>{{ domxref("CSSRule") }}</li>
</ul>
Revert to this revision