|
| 1 | +<!DOCTYPE html> |
| 2 | +<html> |
| 3 | +<head> |
| 4 | +<meta charset="utf-8"> |
| 5 | +<title>CSS Images Module Level 3: parsing gradients with valid position values</title> |
| 6 | +<link rel="author" title="Eric Willigers" href="mailto:ericwilligers@chromium.org"> |
| 7 | +<link rel="help" href="https://drafts.csswg.org/css-values-4/#typedef-position"> |
| 8 | +<meta name="assert" content="gradient positions support the full '<position>' grammar."> |
| 9 | +<script src="/resources/testharness.js"></script> |
| 10 | +<script src="/resources/testharnessreport.js"></script> |
| 11 | +<script src="resources/parsing-testcommon.js"></script> |
| 12 | +</head> |
| 13 | +<body> |
| 14 | +<script> |
| 15 | +// Where two values are shown, the first serialization is being used by Blink/Firefox/WebKit and the second by Edge. |
| 16 | + |
| 17 | +test_valid_value("background-image", "radial-gradient(at 10%, red, blue)", ["radial-gradient(at 10% center, red, blue)", "radial-gradient(at 10%, red, blue)"]); |
| 18 | +test_valid_value("background-image", "radial-gradient(at 20% 30px, red, blue)"); |
| 19 | +test_valid_value("background-image", "radial-gradient(at 30px center, red, blue)", ["radial-gradient(at 30px center, red, blue)", "radial-gradient(at 30px, red, blue)"]); |
| 20 | +test_valid_value("background-image", "radial-gradient(at 40px top, red, blue)"); |
| 21 | +test_valid_value("background-image", "radial-gradient(at bottom 10% right 20%, red, blue)", "radial-gradient(at right 20% bottom 10%, red, blue)"); |
| 22 | +test_valid_value("background-image", "radial-gradient(at bottom right, red, blue)", "radial-gradient(at right bottom, red, blue)"); |
| 23 | +test_valid_value("background-image", "radial-gradient(at center, red, blue)", ["radial-gradient(at center center, red, blue)", "radial-gradient(at center, red, blue)"]); |
| 24 | +test_valid_value("background-image", "radial-gradient(at center 50px, red, blue)"); |
| 25 | +test_valid_value("background-image", "radial-gradient(at center bottom, red, blue)", ["radial-gradient(at center bottom, red, blue)", "radial-gradient(at bottom, red, blue)"]); |
| 26 | +test_valid_value("background-image", "radial-gradient(at center center, red, blue)", ["radial-gradient(at center center, red, blue)", "radial-gradient(at center, red, blue)"]); |
| 27 | +test_valid_value("background-image", "radial-gradient(at center left, red, blue)", ["radial-gradient(at left center, red, blue)", "radial-gradient(at left, red, blue)"]); |
| 28 | +test_valid_value("background-image", "radial-gradient(at left, red, blue)", ["radial-gradient(at left center, red, blue)", "radial-gradient(at left, red, blue)"]); |
| 29 | +test_valid_value("background-image", "radial-gradient(at left bottom, red, blue)"); |
| 30 | +test_valid_value("background-image", "radial-gradient(at left center, red, blue)", ["radial-gradient(at left center, red, blue)", "radial-gradient(at left, red, blue)"]); |
| 31 | +test_valid_value("background-image", "radial-gradient(at right 40%, red, blue)"); |
| 32 | +test_valid_value("background-image", "radial-gradient(at right 30% top 60px, red, blue)"); |
| 33 | +test_valid_value("background-image", "radial-gradient(at top, red, blue)", ["radial-gradient(at center top, red, blue)", "radial-gradient(at top, red, blue)"]); |
| 34 | +test_valid_value("background-image", "radial-gradient(at top center, red, blue)", ["radial-gradient(at center top, red, blue)", "radial-gradient(at top, red, blue)"]); |
| 35 | +</script> |
| 36 | +</body> |
| 37 | +</html> |
0 commit comments