summaryrefslogtreecommitdiffstats
path: root/testing/web-platform/tests/css/css-pseudo/marker-content-013.html
blob: 3b2ce6fa50abac5cd44a75880eb18dad3aae485c (plain)
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
<!DOCTYPE html>
<html class="reftest-wait">
<meta charset="utf-8">
<title>CSS Test: ::marker pseudo elements styled with 'content' property</title>
<link rel="author" title="Oriol Brufau" href="mailto:obrufau@igalia.com">
<link rel="match" href="marker-content-013-ref.html">
<link rel="help" href="https://drafts.csswg.org/css-pseudo-4/#marker-pseudo">
<link rel="help" href="https://drafts.csswg.org/css-lists/#list-style-position-property">
<meta name="assert" content="Checks that ::marker is updated when 'list-style-position' changes dynamically.">
<style>
.inside {
  list-style-position: inside;
}
.string {
  list-style-type: "string";
}
.content::marker {
  content: "content";
}
.before, .after {
  display: contents;
}
.before::before, .after::after {
  content: "item";
  display: list-item;
  list-style-type: "nested";
}
</style>
<ol class="inside">
  <li class="decimal">item</li>
  <li class="string">item</li>
  <li class="content">item</li>
  <li class="before"></li>
  <li class="after"></li>
</ol>
<ol class="outside">
  <li class="decimal">item</li>
  <li class="string">item</li>
  <li class="content">item</li>
  <li class="before"></li>
  <li class="after"></li>
</ol>
<script src="/common/reftest-wait.js"></script>
<script>
"use strict";
addEventListener("load", function() {
  requestAnimationFrame(() => {
    for (const list of document.querySelectorAll("ol")) {
      list.classList.toggle("inside");
      list.classList.toggle("outside");
    }
    takeScreenshot();
  });
}, {once: true});
</script>
</html>