Skip to content

Commit

Permalink
Bug 1704821 [wpt PR 28453] - [css-lists] Test counter-reset: reversed…
Browse files Browse the repository at this point in the history
…(), a=testonly

Automatic update from web-platform-tests
[css-lists] Test counter-reset: reversed()

See
w3c/csswg-drafts#6096
w3c/csswg-drafts#6297
--

wpt-commits: 35300f2e3eb30bf59558397b4bf533e40ead14c1
wpt-pr: 28453
  • Loading branch information
zcorpan authored and moz-wptsync-bot committed Jun 26, 2021
1 parent 75a2ae2 commit 9203b2a
Show file tree
Hide file tree
Showing 5 changed files with 85 additions and 0 deletions.
5 changes: 5 additions & 0 deletions testing/web-platform/tests/css/css-lists/counter-10-ref.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
<!DOCTYPE html>
<meta charset="utf-8">
<title>CSS Test Reference</title>
<p>You should see the number 10 below.</p>
<div>10</div>
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
<!DOCTYPE html>
<meta charset="utf-8">
<title>CSS Lists: counter-reset reversed(list-item) with start value</title>
<link rel="help" href="https://drafts.csswg.org/css-lists/#counter-reset">
<link rel="match" href="counter-7-ref.html">
<style>
.li { display: list-item; }
.reset-reversed { counter-reset: reversed(list-item) 10 }
.result::before { content: counter(list-item) }
.li:not(.result) { height: 0 }
</style>
<p>You should see the number 7 below.</p>
<div>
<span class="li reset-reversed"></span>
<span class="li"></span>
<span class="li result"></span>
<span class="li"></span>
<span class="li"></span>
<span class="li"></span>
<span class="li"></span>
</div>
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
<!DOCTYPE html>
<meta charset="utf-8">
<title>CSS Lists: counter-reset reversed(list-item)</title>
<link rel="help" href="https://drafts.csswg.org/css-lists/#counter-reset">
<link rel="match" href="counter-7-ref.html">
<style>
.li { display: list-item; }
.reset-reversed { counter-reset: reversed(list-item) }
.result::before { content: counter(list-item) }
</style>
<p>You should see the number 7 below.</p>
<div>
<span class="li result reset-reversed"></span>
<span class="li"></span>
<span class="li"></span>
<span class="li"></span>
<span class="li"></span>
<span class="li"></span>
<span class="li"></span>
</div>
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
<!DOCTYPE html>
<meta charset="utf-8">
<title>CSS Lists: counter-reset reversed(not-list-item) with start value</title>
<link rel="help" href="https://drafts.csswg.org/css-lists/#counter-reset">
<link rel="match" href="counter-7-ref.html">
<style>
.reset-reversed { counter-reset: reversed(not-list-item) 7 }
.result::before { content: counter(not-list-item) }
</style>
<p>You should see the number 7 below.</p>
<div>
<span class="reset-reversed"></span>
<span></span>
<span class="result"></span>
<span></span>
<span></span>
<span></span>
<span></span>
</div>
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
<!DOCTYPE html>
<meta charset="utf-8">
<title>CSS Lists: counter-reset reversed(not-list-item)</title>
<link rel="help" href="https://drafts.csswg.org/css-lists/#counter-reset">
<link rel="match" href="counter-10-ref.html">
<style>
span { counter-increment: not-list-item -2; }
.reset-reversed { counter-reset: reversed(not-list-item) }
.result::before { content: counter(not-list-item) }
</style>
<p>You should see the number 10 below.</p>
<div>
<span class="reset-reversed"></span>
<span></span>
<span class="result"></span>
<span></span>
<span></span>
<span></span>
<span></span>
</div>

0 comments on commit 9203b2a

Please sign in to comment.