initial

  • Revision slug: CSS/initial
  • Revision title: initial | -moz-initial
  • Revision id: 41029
  • Created:
  • Creator: teoli
  • Is current revision? No
  • Comment 32 words added, 8 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>

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 {{ cssxref("quotes") }} since Firefox 3.5 (Gecko 1.9.1)
  • Support for {{ cssxref("-moz-border-top-colors","-moz-border-*-colors") }} since Firefox 3.6 (Gecko 1.9.2)

Specifications

Specification Status Comment
CSS Values and Units Level 3 {{ Spec2('CSS3 Values') }} Defines the keyword
CSS Cascade And Inheritance Level 3 {{ Spec2('CSS3 Cascade') }} Defines what an initial value is

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> /* 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>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</p>
<ul> <li>Support for {{ cssxref("quotes") }} since Firefox 3.5 (Gecko 1.9.1)</li> <li>Support for {{ cssxref("-moz-border-top-colors","-moz-border-*-colors") }} since Firefox 3.6 (Gecko 1.9.2)</li>
</ul>
<h3 name="Specifications">Specifications</h3>
<table border="1" cellpadding="1" cellspacing="1" style="width: 1053px; border-style: solid; border-width: 1px; height: 75px; border-color: rgb(0,0,0);"> <thead> <tr style="background-color: rgb(255, 204, 255);"> <th scope="col">Specification</th> <th scope="col">Status</th> <th scope="col">Comment</th> </tr> </thead> <tbody> <tr> <td><a class="external" href="http://www.w3.org/TR/css3-values/#keywords" title="http://www.w3.org/TR/css3-values/#keywords">CSS Values and Units Level 3</a></td> <td>{{ Spec2('CSS3 Values') }}</td> <td>Defines the keyword</td> </tr> <tr style="vertical-align: top;"> <td style="vertical-align: top;"><a class="external" href="http://www.w3.org/TR/css3-cascade/#initial0" rel="external" target="_blank" title="http://www.w3.org/TR/css3-cascade/#initial0">CSS Cascade And Inheritance Level 3</a></td> <td style="vertical-align: top;">{{ Spec2('CSS3 Cascade') }}</td> <td style="vertical-align: top;">Defines what an initial value is</td> </tr> </tbody>
</table>
<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