MDN may have intermittent access issues April 18 13:00 - April 19 01:00 UTC. See whistlepig.mozilla.org for all notifications.

mozilla

Revision 69277 of <number>

  • Revision slug: CSS/number
  • Revision title: number
  • Revision id: 69277
  • Created:
  • Creator: teoli
  • Is current revision? No
  • Comment 24 words added

Revision Content

{{ CSSRef() }}

The <number> CSS data type represents a number, either integer or fractional. Its syntax extends the one of the {{ Xref_cssinteger() }} data value. To represent a fractional value, add the fractional part — a '.' followed by one or several decimal digits — to any {{ Xref_cssinteger() }} data value. Like for {{ Xref_cssinteger() }} data type, there isn't any unit associated to a <number>.

Specifications

Specification Status Comment
CSS Values and Units Level 3 {{ Spec2('CSS3 Values') }} No significant change from CSS Level 2 (Revision 1)
CSS Level 2 (Revision 1) {{ Spec2('CSS2.1') }} Explicitly defined
CSS Level 1 {{ Spec2('CSS1') }} Implicitly defined

Browser Compatibility

{{ CompatibilityTable() }}

Feature Chrome Firefox (Gecko) Internet Explorer Opera Safari (WebKit)
basic 1.0 1.0 (1.0) <=5.0 yes 1.0 (85)
Feature Android Firefox Mobile (Gecko) IE Phone Opera Mobile Safari Mobile
Basic support yes yes yes yes yes

See also

{{ languages( { "es": "es/CSS/number", "fr": "fr/CSS/nombre", "ja": "ja/CSS/number" } ) }}

Revision Source

<p>{{ CSSRef() }}</p>
<p>The <code>&lt;number&gt;</code> <a href="/en/CSS" title="CSS">CSS</a> data type represents a number, either integer or fractional. Its syntax extends the one of the {{ Xref_cssinteger() }} data value. To represent a fractional value, add the fractional part — a '.' followed by one or several decimal digits — to any {{ Xref_cssinteger() }} data value. Like for {{ Xref_cssinteger() }} data type, there isn't any unit associated to a <code>&lt;number&gt;</code>.</p>
<h2 name="Specifications">Specifications</h2>
<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/#numbers" title="http://www.w3.org/TR/css3-values/#numbers">CSS Values and Units Level 3</a></td> <td>{{ Spec2('CSS3 Values') }}</td> <td>No significant change from CSS Level 2 (Revision 1)</td> </tr> <tr style="vertical-align: top;"> <td style="vertical-align: top;"><a class="external" href="http://www.w3.org/TR/CSS21/syndata.html#numbers" title="http://www.w3.org/TR/CSS21/syndata.html#numbers">CSS Level 2 (Revision 1)</a></td> <td style="vertical-align: top;">{{ Spec2('CSS2.1') }}</td> <td style="vertical-align: top;">Explicitly defined</td> </tr> <tr> <td style="vertical-align: top;"><a class="external" href="http://www.w3.org/TR/CSS1/" title="http://www.w3.org/TR/CSS1/">CSS Level 1</a></td> <td style="vertical-align: top;">{{ Spec2('CSS1') }}</td> <td style="vertical-align: top;">Implicitly defined</td> </tr> </tbody>
</table>
<h2 name="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</td> <td>1.0</td> <td>1.0 (1.0)</td> <td>&lt;=5.0</td> <td>yes</td> <td>1.0 (85)</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 Phone</th> <th>Opera Mobile</th> <th>Safari Mobile</th> </tr> <tr> <td>Basic support</td> <td>yes</td> <td>yes</td> <td>yes</td> <td>yes</td> <td>yes</td> </tr> </tbody> </table>
</div>
<h2 name="See_also">See also</h2>
<div class="noinclude"> <p>{{ languages( { "es": "es/CSS/number", "fr": "fr/CSS/nombre", "ja": "ja/CSS/number" } ) }}</p>
</div>
Revert to this revision