Status: PASS | Duration: 54ms | Subtests: 9/9 | Open test on wpt.live | wpt.fyi
Data from commit:
a50cb89 wpt: run reference-named files which are themselves tests (#836) (2026-09-03)
| Subtest | Status | Message |
|---|---|---|
| e.style['background-color'] = "currentcolor" should set the property value | PASS | |
| e.style['background-color'] = "currentColor" should set the property value | PASS | |
| e.style['background-color'] = "red" should set the property value | PASS | |
| e.style['background-color'] = "#00FF00" should set the property value | PASS | |
| e.style['background-color'] = "rgb(0, 0, 255)" should set the property value | PASS | |
| e.style['background-color'] = "rgb(100%, 100%, 0%)" should set the property value | PASS | |
| e.style['background-color'] = "hsl(120, 100%, 50%)" should set the property value | PASS | |
| e.style['background-color'] = "teal" should set the property value | PASS | |
| e.style['background-color'] = "transparent" should set the property value | PASS |
/css/css-backgrounds/parsing/background-color-valid.html
<!DOCTYPE html> <html> <head> <meta charset="utf-8"> <title>CSS Backgrounds and Borders Module Level 3: parsing background-color with valid values</title> <link rel="author" title="Eric Willigers" href="mailto:ericwilligers@chromium.org"> <link rel="help" href="https://drafts.csswg.org/css-backgrounds/#background-color"> <meta name="assert" content="background-color supports the full grammar '<color>'."> <script src="/resources/testharness.js"></script> <script src="/resources/testharnessreport.js"></script> <script src="/css/support/parsing-testcommon.js"></script> </head> <body> <script> test_valid_value("background-color", "currentcolor", "currentcolor"); test_valid_value("background-color", "currentColor", "currentcolor"); test_valid_value("background-color", "red"); test_valid_value("background-color", "#00FF00", "rgb(0, 255, 0)"); test_valid_value("background-color", "rgb(0, 0, 255)"); test_valid_value("background-color", "rgb(100%, 100%, 0%)", "rgb(255, 255, 0)"); test_valid_value("background-color", "hsl(120, 100%, 50%)", ["rgb(0, 255, 0)", "hsl(120, 100%, 50%)"]); // Edge serializes as hsl test_valid_value("background-color", "teal"); test_valid_value("background-color", "transparent"); </script> </body> </html>