Skip to content

Commit f4a37f5

Browse files
author
John Daggett
committed
[css3-fonts] add ordinals example
1 parent 15e24d6 commit f4a37f5

1 file changed

Lines changed: 30 additions & 5 deletions

File tree

css-fonts/Fonts.html

Lines changed: 30 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4387,11 +4387,6 @@ <h3 id=font-variant-numeric-prop><span class=secno>6.7 </span>Numerical
43874387

43884388
<div class=featex><img alt="ordinals example" src=ordinals.png></div>
43894389

4390-
<p class=note>Although ordinal forms are often the same as superscript
4391-
forms, they can be different depending upon the typographic traditions
4392-
used in a given language. In Italian for example, ordinal forms sometimes
4393-
include an underline in the glyph design.
4394-
43954390
<dl>
43964391
<dt><dfn id=slashed-zero>slashed-zero</dfn>
43974392

@@ -4401,6 +4396,34 @@ <h3 id=font-variant-numeric-prop><span class=secno>6.7 </span>Numerical
44014396

44024397
<div class=featex><img alt="slashed zero example" src=zero.png></div>
44034398

4399+
<div class=example>
4400+
<p>In the case of ‘<a href="#ordinal"><code
4401+
class=property>ordinal</code></a>’, although ordinal forms are often
4402+
the same as superscript forms, they are marked up differently.</p>
4403+
4404+
<p>For superscripts, the variant property is only applied to the
4405+
sub-element containing the superscript:</p>
4406+
4407+
<pre>
4408+
sup { font-variant-position: super; }
4409+
x&lt;sup&gt;2&lt;/sup&gt;
4410+
</pre>
4411+
4412+
<p>For ordinals, the variant property is applied to the entire ordinal
4413+
number:</p>
4414+
4415+
<pre>
4416+
.ordinal { font-variant-numeric: ordinal; }
4417+
&lt;span class="ordinal"&gt;17th&lt;/span&gt;
4418+
</pre>
4419+
4420+
<p>In this case only the "th" will appear in ordinal form, the digits will
4421+
remain unchanged. Depending upon the typographic traditions used in a
4422+
given language, ordinal forms may differ from superscript forms. In
4423+
Italian, for example, ordinal forms sometimes include an underline in the
4424+
design of ordinals.</p>
4425+
</div>
4426+
44044427
<div class=example id=steak-marinade>
44054428
<p>A simple flank steak marinade recipe, rendered with automatic fractions
44064429
and old-style numerals:</p>
@@ -5955,6 +5978,8 @@ <h3 class=no-num id=recent-changes> Changes from the <a
59555978
<li>allow user agents to synthesize OpenType <span class=tag>kern</span>
59565979
feature
59575980

5981+
<li>add example of ordinals and associated markup
5982+
59585983
<li>minor editorial cleanups
59595984
</ul>
59605985

0 commit comments

Comments
 (0)