Skip to content

Commit

Permalink
Loosen marker-font-variant-numeric-normal.html
Browse files Browse the repository at this point in the history
Allow it to pass on browsers that don't support nested pseudo-elements
like ::before::marker or ::after::marker.
  • Loading branch information
Loirooriol committed Nov 15, 2024
1 parent 5420c40 commit a6ab90e
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 5 deletions.
19 changes: 14 additions & 5 deletions css/css-pseudo/marker-font-variant-numeric-normal-ref.html
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,17 @@
width: 25px;
height: 25px;
}
@supports not (selector(::before::marker) and selector(::after::marker)) {
/* Allow the test to pass on browsers that support ::marker but not nested
::before::marker nor ::after::marker. On these browsers, the test isn't
able to set `font-variant-numeric: normal` on the nested pseudo-elements,
so expect `font-variant-numeric: tabular-nums` instead. */
.before, .after {
font-variant-numeric: tabular-nums;
}
}
</style>
<ol>
<ol class="decimal">
<li>1. <span>X</span></li>
<li>2. <span>X</span></li>
<li>3. <span>X</span></li>
Expand All @@ -37,7 +46,7 @@
<li>8. <span>X</span></li>
<li>9. <span>X</span></li>
</ol>
<ol>
<ol class="string">
<li>1. <span>X</span></li>
<li>2. <span>X</span></li>
<li>3. <span>X</span></li>
Expand All @@ -48,7 +57,7 @@
<li>8. <span>X</span></li>
<li>9. <span>X</span></li>
</ol>
<ol>
<ol class="marker">
<li>1. <span>X</span></li>
<li>2. <span>X</span></li>
<li>3. <span>X</span></li>
Expand All @@ -59,7 +68,7 @@
<li>8. <span>X</span></li>
<li>9. <span>X</span></li>
</ol>
<ol>
<ol class="before">
<li>1. <span>X</span></li>
<li>2. <span>X</span></li>
<li>3. <span>X</span></li>
Expand All @@ -70,7 +79,7 @@
<li>8. <span>X</span></li>
<li>9. <span>X</span></li>
</ol>
<ol>
<ol class="after">
<li>1. <span>X</span></li>
<li>2. <span>X</span></li>
<li>3. <span>X</span></li>
Expand Down
4 changes: 4 additions & 0 deletions css/css-pseudo/marker-font-variant-numeric-normal.html
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,10 @@
::marker {
font-variant-numeric: normal;
}

/* Sume browsers support ::marker but not ::before::marker or ::after::marker.
Therefore, this is only enforced if the browser supports the selector,
otherwise, the reference will expect the default `tabular-nums` */
::before::marker, ::after::marker {
font-variant-numeric: normal;
}
Expand Down

0 comments on commit a6ab90e

Please sign in to comment.