summaryrefslogtreecommitdiffstats
path: root/testing/web-platform/tests/css/css-lists/nested-marker-dynamic.html
blob: fdfb93dc6149055be4611d85fb9705bcafe5c3a5 (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
<!doctype html>
<title>::marker pseudo-elements generated by ::before and ::after are not addressable by selectors</title>
<link rel="help" href="https://drafts.csswg.org/css-lists/#list-item">
<link rel="help" href="https://bugzilla.mozilla.org/show_bug.cgi?id=1539171">
<link rel="help" href="https://bugzilla.mozilla.org/show_bug.cgi?id=1543758">
<link rel="author" href="mailto:emilio@crisal.io" title="Emilio Cobos Álvarez">
<link rel="author" href="https://mozilla.org" title="Mozilla">
<link rel="match" href="nested-marker-ref.html">
<style>
  li, ::marker {
    color: red;
  }
  li::before, li::after {
    display: list-item;
    content: "Before";
  }
  li::after {
    content: "After";
  }
  .tweak::marker {
    color: blue;
  }
  .tweak, .tweak::before, .tweak::after {
    color: initial;
  }
</style>
<ol>
  <li>Foo
  <li>Bar
<script>
  window.onload = function() {
    document.body.offsetTop;
    for (let li of document.querySelectorAll("li"))
      li.classList.add("tweak");
  }
</script>