|
5 | 5 | <title>CSS Backgrounds and Borders: getComputedValue().backgroundImagetitle>
|
6 | 6 | <link rel="help" href="https://drafts.csswg.org/css-backgrounds/#background-image">
|
7 | 7 | <meta name="assert" content="background-image computed value is as specified.">
|
| 8 | +<meta name="assert" content="Colors and lengths are computed, with radii clamped."> |
8 | 9 | <script src="/resources/testharness.js">script>
|
9 | 10 | <script src="/resources/testharnessreport.js">script>
|
10 | 11 | <script src="/css/support/computed-testcommon.js">script>
|
| 12 | +<style> |
| 13 | + #target { |
| 14 | + font-size: 40px; |
| 15 | + } |
| 16 | +style> |
11 | 17 | head>
|
12 | 18 | <body>
|
| 19 | + |
13 | 20 | <div id="target">div>
|
14 | 21 | <script>
|
15 | 22 | test_computed_value("background-image", "none");
|
16 | 23 |
|
17 | 24 | test_computed_value("background-image", 'url("http://{{host}}/")');
|
18 | 25 | test_computed_value("background-image", 'none, url("http://{{host}}/")');
|
| 26 | + |
| 27 | +test_computed_value('background-image', 'linear-gradient(to left bottom, red, blue)', 'linear-gradient(to left bottom, rgb(255, 0, 0), rgb(0, 0, 255))'); |
| 28 | + |
| 29 | +test_computed_value('background-image', 'radial-gradient(10px at 20px 30px, rgb(255, 0, 0), rgb(0, 0, 255))'); |
| 30 | +test_computed_value('background-image', 'radial-gradient(circle calc(-0.5em + 10px) at calc(-1em + 10px) calc(-2em + 10px), red, blue)', 'radial-gradient(0px at -30px -70px, rgb(255, 0, 0), rgb(0, 0, 255))'); |
| 31 | +test_computed_value('background-image', 'radial-gradient(ellipse calc(-0.5em + 10px) calc(0.5em + 10px) at 20px 30px, red, blue)', 'radial-gradient(0px 30px at 20px 30px, rgb(255, 0, 0), rgb(0, 0, 255))'); |
| 32 | +test_computed_value('background-image', 'radial-gradient(ellipse calc(0.5em + 10px) calc(-0.5em + 10px) at 20px 30px, red, blue)', 'radial-gradient(30px 0px at 20px 30px, rgb(255, 0, 0), rgb(0, 0, 255))'); |
19 | 33 | script>
|
20 | 34 | body>
|
21 | 35 | html>
|
0 commit comments