Skip to content

Commit f4b13be

Browse files
committed
[css-lists] list-style-image computed value
list-style-image supports image, including gradients https://drafts.csswg.org/css-lists-3/#propdef-list-style-image Colors and lengths in gradients are computed in computed style results. w3c/csswg-drafts#4042 calcs giving negative radii are clamped to 0.
1 parent a1212ad commit f4b13be

File tree

1 file changed

+32
-0
lines changed

1 file changed

+32
-0
lines changed
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
>
2+
<html>
3+
<head>
4+
<meta charset="utf-8">
5+
<title>CSS Lists: getComputedValue().listStyleImagetitle>
6+
<link rel="help" href="https://drafts.csswg.org/css-lists-3/#propdef-list-style-image">
7+
<meta name="assert" content="list-style-image computed value is as specified.">
8+
<script src="/resources/testharness.js">script>
9+
<script src="/resources/testharnessreport.js">script>
10+
<script src="/css/support/computed-testcommon.js">script>
11+
<style>
12+
#target {
13+
font-size: 40px;
14+
}
15+
style>
16+
head>
17+
<body>
18+
<div id="target">div>
19+
<script>
20+
test_computed_value('list-style-image', 'none');
21+
22+
test_computed_value('list-style-image', 'url("https://{{host}}/")');
23+
24+
test_computed_value('list-style-image', 'linear-gradient(to left bottom, red , blue )', 'linear-gradient(to left bottom, rgb(255, 0, 0), rgb(0, 0, 255))');
25+
26+
test_computed_value('list-style-image', 'radial-gradient(10px at 20px 30px, rgb(255, 0, 0), rgb(0, 0, 255))');
27+
test_computed_value('list-style-image', 'radial-gradient(circle calc(-0.5em + 10px) at calc(-1em + 10px) calc(-2em + 10px), rgb(255, 0, 0), rgb(0, 0, 255))', 'radial-gradient(0px at -30px -70px, rgb(255, 0, 0), rgb(0, 0, 255))');
28+
test_computed_value('list-style-image', 'radial-gradient(ellipse calc(-0.5em + 10px) calc(0.5em + 10px) at 20px 30px, rgb(255, 0, 0), rgb(0, 0, 255))', 'radial-gradient(0px 30px at 20px 30px, rgb(255, 0, 0), rgb(0, 0, 255))');
29+
test_computed_value('list-style-image', 'radial-gradient(ellipse calc(0.5em + 10px) calc(-0.5em + 10px) at 20px 30px, rgb(255, 0, 0), rgb(0, 0, 255))', 'radial-gradient(30px 0px at 20px 30px, rgb(255, 0, 0), rgb(0, 0, 255))');
30+
script>
31+
body>
32+
html>

0 commit comments

Comments
 (0)