Automatic update from web-platform-tests Implement image(<color>) functional notation Adds the CSS Images Level 4 image() function in its color-only form [1], a solid-color image with no natural dimensions. Implemented as a CSSColorImageValue subclass of CSSConstantGradientValue, reusing the existing solid-color image machinery (already used by cross-fade(<color>)) and overriding only the serialization. Gated behind the CSSImageFunction runtime flag. ChromeStatus: https://chromestatus.com/feature/5121011285622784 [1]: https://drafts.csswg.org/css-images-4/#funcdef-image Bug: 510426954 Change-Id: I0c5e0fa98e41a70cd9f17716f7c0357e352597e6 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/7831826 Commit-Queue: Jason Leo <cgqaq@chromium.org> Reviewed-by: Rune Lillesveen <futhark@chromium.org> Cr-Commit-Position: refs/heads/main@{#1629193} -- wpt-commits: d9065cfb9ed97b9d3d44e9d63a097e3b78a5cf92 wpt-pr: 59815
21 lines
928 B
HTML
21 lines
928 B
HTML
<!DOCTYPE html>
|
|
<meta charset="utf-8">
|
|
<title>CSS Images Module Level 4: invalid image() values</title>
|
|
<link rel="author" title="Jason Leo" href="mailto:cgqaq@chromium.org">
|
|
<link rel="help" href="https://drafts.csswg.org/css-images-4/#image-notation">
|
|
<script src="/resources/testharness.js"></script>
|
|
<script src="/resources/testharnessreport.js"></script>
|
|
<script src="/css/support/parsing-testcommon.js"></script>
|
|
<div id="target"></div>
|
|
<script>
|
|
// image() requires a single <color> argument.
|
|
test_invalid_value("background-image", "image()");
|
|
test_invalid_value("background-image", "image(none)");
|
|
test_invalid_value("background-image", "image(red, blue)");
|
|
test_invalid_value("background-image", "image(notacolor)");
|
|
test_invalid_value("background-image", "image(url(foo.png))");
|
|
|
|
// image() is not a <color> and may not be used where a color is expected.
|
|
test_invalid_value("background-color", "image(red)");
|
|
</script>
|