wpt / css / css-scrollbars / scrollbar-color-parsing.html

Status: PASS | Duration: 64ms | Subtests: 13/13 | Open test on wpt.live | wpt.fyi

Data from commit:
a50cb89 wpt: run reference-named files which are themselves tests (#836) (2026-09-03)

SubtestStatusMessage
e.style['scrollbar-color'] = "initial" should set the property valuePASS
e.style['scrollbar-color'] = "inherit" should set the property valuePASS
e.style['scrollbar-color'] = "unset" should set the property valuePASS
e.style['scrollbar-color'] = "revert" should set the property valuePASS
e.style['scrollbar-color'] = "auto" should set the property valuePASS
e.style['scrollbar-color'] = "red green" should set the property valuePASS
e.style['scrollbar-color'] = "#FF0000 #00FF00" should set the property valuePASS
e.style['scrollbar-color'] = "currentcolor currentcolor" should set the property valuePASS
e.style['scrollbar-color'] = "" should not set the property valuePASS
e.style['scrollbar-color'] = "auto auto" should not set the property valuePASS
e.style['scrollbar-color'] = "auto currentcolor" should not set the property valuePASS
e.style['scrollbar-color'] = "red" should not set the property valuePASS
e.style['scrollbar-color'] = "#FF0000" should not set the property valuePASS

/css/css-scrollbars/scrollbar-color-parsing.html

<!doctype html>
<meta charset="utf-8">
<title>CSS Scrollbars: parsing scrollbar-color declarations</title>
<link rel="help" href="https://drafts.csswg.org/css-scrollbars/"/>
<meta name="assert" content="Parsing scrollbar-color declarations">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="/css/support/parsing-testcommon.js"></script>

<script>
    test_valid_value('scrollbar-color', 'initial');
    test_valid_value('scrollbar-color', 'inherit');
    test_valid_value('scrollbar-color', 'unset');
    test_valid_value('scrollbar-color', 'revert');
    test_valid_value('scrollbar-color', 'auto');
    test_valid_value("scrollbar-color", "red green");
    test_valid_value("scrollbar-color", "#FF0000 #00FF00", "rgb(255, 0, 0) rgb(0, 255, 0)");
    test_valid_value("scrollbar-color", "currentcolor currentcolor");

    test_invalid_value("scrollbar-color", "");
    test_invalid_value("scrollbar-color", "auto auto");
    test_invalid_value("scrollbar-color", "auto currentcolor");
    test_invalid_value("scrollbar-color", "red");
    test_invalid_value("scrollbar-color", "#FF0000");

</script>