blob: f36228719a0656e822892661e83a23a8382c742c (
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
57
58
59
60
61
62
63
64
65
66
|
<!DOCTYPE html>
<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-012-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/#content-property">
<meta name="assert" content="Checks that ::marker's 'content' takes precendence over 'list-style-type' and 'list-style-image'">
<style>
:root {
--red-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="32" height="16" style="background: red"></svg>');
--green-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="32" height="16" style="background: green"></svg>');
}
ul {
float: left;
}
.inside {
list-style-position: inside;
}
.text::marker {
content: "text";
}
.image::marker {
content: var(--green-image);
}
</style>
<ul style="list-style-type: none">
<li class="outside normal">item</li>
<li class="outside text">item</li>
<li class="outside image">item</li>
<li class="inside normal">item</li>
<li class="inside text">item</li>
<li class="inside image">item</li>
</ul>
<ul style="list-style-type: decimal">
<li class="outside normal">item</li>
<li class="outside text">item</li>
<li class="outside image">item</li>
<li class="inside normal">item</li>
<li class="inside text">item</li>
<li class="inside image">item</li>
</ul>
<ul style="list-style-type: disc">
<li class="outside normal">item</li>
<li class="outside text">item</li>
<li class="outside image">item</li>
<li class="inside normal">item</li>
<li class="inside text">item</li>
<li class="inside image">item</li>
</ul>
<ul style="list-style-type: 'string'">
<li class="outside normal">item</li>
<li class="outside text">item</li>
<li class="outside image">item</li>
<li class="inside normal">item</li>
<li class="inside text">item</li>
<li class="inside image">item</li>
</ul>
<ul style="list-style-image: var(--red-image)">
<li class="outside normal">item</li>
<li class="outside text">item</li>
<li class="outside image">item</li>
<li class="inside normal">item</li>
<li class="inside text">item</li>
<li class="inside image">item</li>
</ul>
|