mozilla

Revision 41022 of initial

  • Revision slug: CSS/initial
  • Revision title: initial | -moz-initial
  • Revision id: 41022
  • Created:
  • Creator: Jürgen Jeka
  • Is current revision? No
  • Comment 10 words added

Revision Content

{{ CSSMozExtensionRef() }}

Summary

The -moz-initial value is a Mozilla implementation of CSS3 {{ cssxref("initial") }}. Applies the initial value of a property to an element.

-moz-initial (initial) is allowed on every CSS property. It causes the element for which it is specified to use the initial value of the property.

For non-inherited properties

For non-inherited properties, this reinforces the default behavior, and is only needed to override another rule. For example:

 /* give headers a green border */
 h2 { border: medium solid green }

 /* but make those in the sidebar use the value of the color property */
 #sidebar h2 { border-color: -moz-initial; border-color: initial; }

For inherited properties

For inherited properties, this behavior is somewhat more unusual since it is not reinforcing the default behavior.

 <p style="color:red"> 
    this text is red 
       <em style="color:-moz-initial;  color:initial"> 
          this text is in the initial color (e.g. black)
       </em>
    this is red again
 </p>

Specifications

Browser Compatibility

Browser Lowest Version Support of
Internet Explorer n/a  
Firefox (Gecko) (*) 1.0-3.0 (1.0-1.9) -moz-initial
Opera n/a  
Safari (WebKit) yes (version?) initial

(*) Increasing support in each version, almost complete in Firefox 3.0 (support for quotes and -moz-border-*-colors in Firefox 3.6 / Gecko 1.9.2).

See Also

Initial value, {{ cssxref("inherit") }}

{{ languages( { "es": "es/CSS/initial", "fr": "fr/CSS/initial" } ) }}

Revision Source

<p>{{ CSSMozExtensionRef() }}</p>
<h3 name="Summary">Summary</h3>
<p>The<code> <code>-moz-initial</code> </code>value is a Mozilla implementation of CSS3 {{ cssxref("initial") }}. Applies the initial value of a property to an element.</p>
<p><code>-moz-initial </code>(<code>initial</code>) is allowed on every CSS property. It causes the element for which it is specified to use the <a href="/en/CSS/initial_value" title="en/CSS/initial_value">initial value</a> of the property.</p>
<h4 name="For_non-inherited_properties">For non-inherited properties</h4>
<p>For <a href="/en/CSS/inheritance" title="en/CSS/inheritance">non-inherited properties</a>, this reinforces the default behavior, and is only needed to override another rule. For example:</p>
<pre class="eval"> /* give headers a green border */
 h2 { border: medium solid green }

 /* but make those in the sidebar use the value of the <a href="/en/CSS/color" title="en/CSS/color">color</a> property */
 #sidebar h2 { border-color: -moz-initial; border-color: initial; }
</pre>
<h4 name="For_inherited_properties">For inherited properties</h4>
<p>For <a href="/en/CSS/inheritance" title="en/CSS/inheritance">inherited properties</a>, this behavior is somewhat more unusual since it is not reinforcing the default behavior.</p>
<pre> &lt;p style="color:red"&gt; 
    this text is red 
       &lt;em style="color:-moz-initial;  color:initial"&gt; 
          this text is in the initial color (e.g. black)
       &lt;/em&gt;
    this is red again
 &lt;/p&gt;
</pre>
<h3 name="Specifications">Specifications</h3>
<ul> <li><a class="external" href="http://www.w3.org/TR/css3-values/#keywords">CSS 3 Values #keywords</a></li> <li><a class="external" href="http://www.w3.org/TR/css3-cascade/#initial0">CSS 3 Cascade #initial</a></li>
</ul>
<h3 name="Browser_Compatibility">Browser Compatibility</h3>
<table class="standard-table"> <tbody> <tr> <th>Browser</th> <th>Lowest Version</th> <th>Support of</th> </tr> <tr> <td>Internet Explorer</td> <td>n/a</td> <td> </td> </tr> <tr> <td>Firefox (Gecko) (*)</td> <td>1.0-<strong>3.0</strong> (1.0-1.9)</td> <td><code>-moz-initial</code></td> </tr> <tr> <td>Opera</td> <td>n/a</td> <td> </td> </tr> <tr> <td>Safari (WebKit)</td> <td><strong>yes</strong> (version?)</td> <td><code>initial</code></td> </tr> </tbody>
</table>
<p>(*) Increasing support in each version, almost complete in Firefox 3.0 (support for<code> quotes </code>and <code>-moz-border-*-colors </code>in Firefox 3.6 / Gecko 1.9.2).</p>
<h3 name="See_Also">See Also</h3>
<p><a class="internal" href="/En/CSS/Initial%20value" title="En/CSS/Initial value">Initial value</a>, {{ cssxref("inherit") }}</p>
<p>{{ languages( { "es": "es/CSS/initial", "fr": "fr/CSS/initial" } ) }}</p>
Revert to this revision