mozilla

Revision 41026 of initial

  • Revision slug: CSS/initial
  • Revision title: initial | -moz-initial
  • Revision id: 41026
  • Created:
  • Creator: Jürgen Jeka
  • Is current revision? No
  • Comment removed outdated difference between inherited and non-inherited properties; 5 words added, 53 words removed

Revision Content

{{ CSSMozExtensionRef() }}

Summary

The -moz-initial CSS keyword is a Mozilla implementation of CSS3 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.

Examples

 /* 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; }
 <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 --- ---
Firefox (Gecko) 1.0-3.0 (1.0-1.9) [*] -moz-initial
Opera --- ---
Safari (WebKit) 1.2 (125) initial

[*] Increasing support in each version, almost complete in Firefox 3.0 (support for quotes and -moz-border-*-colors in 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>Summary</h3>
<p>The<code> -moz-initial </code>CSS keyword is a Mozilla implementation of CSS3<code> initial</code>. 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>
<h3>Examples</h3>
<pre class="eval"> /* 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; }
</pre>
<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>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>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>---</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>---</td> <td>---</td> </tr> <tr> <td>Safari (WebKit)</td> <td><strong>1.2</strong> (125)</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 Gecko 1.9.2).</p>
<h3>See Also</h3>
<p><a class="internal" href="/en/CSS/initial_value" 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