-
Notifications
You must be signed in to change notification settings - Fork 3.1k
/
marker-font-variant-numeric-normal.html
115 lines (112 loc) · 2.92 KB
/
marker-font-variant-numeric-normal.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
<!DOCTYPE html>
<meta charset="utf-8">
<title>::marker accepts 'font-variant-numeric: normal'</title>
<link rel="author" title="Oriol Brufau" href="mailto:[email protected]" />
<link rel="help" href="https://drafts.csswg.org/css-pseudo-4/#marker-pseudo">
<link rel="match" href="marker-font-variant-numeric-normal-ref.html">
<meta name="assert" content="Checks that the marker default 'font-variant-numeric: tabular-nums' can be overridden with 'font-variant-numeric: normal'">
<link rel="stylesheet" type="text/css" href="/fonts/ahem.css" />
<style>
@font-face {
/* This font looks different with 'font-variant-numeric: tabular-nums' */
font-family: 'Exo 2';
src: local('Exo 2'),
url('/css/css-fonts/support/fonts/Exo2-SemiBold.otf') format("opentype");
}
ol {
float: left;
width: 50px;
line-height: 25px;
list-style-position: inside;
font-family: "Exo 2";
}
span {
display: inline-block;
font: 25px/1 Ahem;
vertical-align: top;
}
li:nth-child(1) { --marker: "1. " }
li:nth-child(2) { --marker: "2. " }
li:nth-child(3) { --marker: "3. " }
li:nth-child(4) { --marker: "4. " }
li:nth-child(5) { --marker: "5. " }
li:nth-child(6) { --marker: "6. " }
li:nth-child(7) { --marker: "7. " }
li:nth-child(8) { --marker: "8. " }
li:nth-child(9) { --marker: "9. " }
.string > li {
list-style-type: var(--marker);
}
.marker > li::marker {
content: var(--marker);
}
.before > li, .after > li {
display: block;
}
.before > li::before, .after > li::after {
content: "\200B"; /* zero-width space */
display: list-item;
float: left;
}
::marker {
font-variant-numeric: normal;
}
::before::marker, ::after::marker {
font-variant-numeric: normal;
}
</style>
<ol class="decimal">
<li><span>X</span></li>
<li><span>X</span></li>
<li><span>X</span></li>
<li><span>X</span></li>
<li><span>X</span></li>
<li><span>X</span></li>
<li><span>X</span></li>
<li><span>X</span></li>
<li><span>X</span></li>
</ol>
<ol class="string">
<li><span>X</span></li>
<li><span>X</span></li>
<li><span>X</span></li>
<li><span>X</span></li>
<li><span>X</span></li>
<li><span>X</span></li>
<li><span>X</span></li>
<li><span>X</span></li>
<li><span>X</span></li>
</ol>
<ol class="marker">
<li><span>X</span></li>
<li><span>X</span></li>
<li><span>X</span></li>
<li><span>X</span></li>
<li><span>X</span></li>
<li><span>X</span></li>
<li><span>X</span></li>
<li><span>X</span></li>
<li><span>X</span></li>
</ol>
<ol class="before">
<li><span>X</span></li>
<li><span>X</span></li>
<li><span>X</span></li>
<li><span>X</span></li>
<li><span>X</span></li>
<li><span>X</span></li>
<li><span>X</span></li>
<li><span>X</span></li>
<li><span>X</span></li>
</ol>
<ol class="after">
<li><span>X</span></li>
<li><span>X</span></li>
<li><span>X</span></li>
<li><span>X</span></li>
<li><span>X</span></li>
<li><span>X</span></li>
<li><span>X</span></li>
<li><span>X</span></li>
<li><span>X</span></li>
</ol>