Skip to content

Commit db904bd

Browse files
author
Simon Pieters
committed
[cssom] Specify serialization of <number>
1 parent f074078 commit db904bd

2 files changed

Lines changed: 12 additions & 6 deletions

File tree

cssom/Overview.html

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2599,9 +2599,12 @@ <h4 id="serializing-css-values"><span class="secno">6.6.2 </span>Serializing CSS
25992599
</dd>
26002600

26012601
<dt>&lt;number&gt;</dt>
2602-
<dd><p class="issue">Browsers seem to use ToString(), but that might give a
2603-
significand which according to some is teh evil (and also currently does
2604-
not parse correctly).</dd>
2602+
<dd>
2603+
<p>A base-ten number using digits 0-9 (U+0030 to U+0039) in the shortest form possible, using "<code title="">.</code>" to separate decimals (if any), preceded
2604+
by "<code title="">-</code>" (U+002D) if it is negative.
2605+
2606+
<p class="note">JavaScript's <code title="">ToString</code> algorithm cannot be used since it can serialize numbers using an exponent, which would not round-trip
2607+
in CSS.
26052608

26062609
<dt>&lt;percentage&gt;</dt>
26072610
<dd><p>The &lt;number&gt; component serialized as per &lt;number&gt; followed

cssom/Overview.src.html

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2521,9 +2521,12 @@ <h4>Serializing CSS Values</h4>
25212521
</dd>
25222522

25232523
<dt>&lt;number></dt>
2524-
<dd><p class="issue">Browsers seem to use ToString(), but that might give a
2525-
significand which according to some is teh evil (and also currently does
2526-
not parse correctly).</p></dd>
2524+
<dd>
2525+
<p>A base-ten number using digits 0-9 (U+0030 to U+0039) in the shortest form possible, using "<code title>.</code>" to separate decimals (if any), preceded
2526+
by "<code title>-</code>" (U+002D) if it is negative.
2527+
2528+
<p class=note>JavaScript's <code title>ToString</code> algorithm cannot be used since it can serialize numbers using an exponent, which would not round-trip
2529+
in CSS.
25272530

25282531
<dt>&lt;percentage></dt>
25292532
<dd><p>The &lt;number> component serialized as per &lt;number> followed

0 commit comments

Comments
 (0)