mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-06-09 09:34:57 +09:00
LibWeb/CSS: Implement the scrollbar-color
property
This allows the user to set the scrollbar thumb and track colors.
This commit is contained in:
parent
285bc005cb
commit
e2d0d8e2b9
Notes:
github-actions[bot]
2025-06-01 22:18:57 +00:00
Author: https://github.com/tcl3
Commit: e2d0d8e2b9
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/4893
24 changed files with 212 additions and 10 deletions
|
@ -208,6 +208,7 @@ All properties associated with getComputedStyle(document.body):
|
|||
"rx",
|
||||
"ry",
|
||||
"scale",
|
||||
"scrollbar-color",
|
||||
"scrollbar-gutter",
|
||||
"scrollbar-width",
|
||||
"stop-color",
|
||||
|
|
|
@ -564,6 +564,8 @@ All supported properties and their default values exposed from CSSStylePropertie
|
|||
'rx': 'auto'
|
||||
'ry': 'auto'
|
||||
'scale': 'none'
|
||||
'scrollbarColor': 'auto'
|
||||
'scrollbar-color': 'auto'
|
||||
'scrollbarGutter': 'auto'
|
||||
'scrollbar-gutter': 'auto'
|
||||
'scrollbarWidth': 'auto'
|
||||
|
|
|
@ -206,6 +206,7 @@ row-gap: normal
|
|||
rx: auto
|
||||
ry: auto
|
||||
scale: none
|
||||
scrollbar-color: auto
|
||||
scrollbar-gutter: auto
|
||||
scrollbar-width: auto
|
||||
stop-color: rgb(0, 0, 0)
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
Harness status: OK
|
||||
|
||||
Found 199 tests
|
||||
Found 200 tests
|
||||
|
||||
189 Pass
|
||||
190 Pass
|
||||
10 Fail
|
||||
Pass accent-color
|
||||
Pass border-collapse
|
||||
|
@ -175,6 +175,7 @@ Pass row-gap
|
|||
Pass rx
|
||||
Pass ry
|
||||
Pass scale
|
||||
Pass scrollbar-color
|
||||
Pass scrollbar-gutter
|
||||
Pass scrollbar-width
|
||||
Pass stop-color
|
||||
|
|
|
@ -0,0 +1,18 @@
|
|||
Harness status: OK
|
||||
|
||||
Found 13 tests
|
||||
|
||||
13 Pass
|
||||
Pass e.style['scrollbar-color'] = "initial" should set the property value
|
||||
Pass e.style['scrollbar-color'] = "inherit" should set the property value
|
||||
Pass e.style['scrollbar-color'] = "unset" should set the property value
|
||||
Pass e.style['scrollbar-color'] = "revert" should set the property value
|
||||
Pass e.style['scrollbar-color'] = "auto" should set the property value
|
||||
Pass e.style['scrollbar-color'] = "red green" should set the property value
|
||||
Pass e.style['scrollbar-color'] = "#FF0000 #00FF00" should set the property value
|
||||
Pass e.style['scrollbar-color'] = "currentcolor currentcolor" should set the property value
|
||||
Pass e.style['scrollbar-color'] = "" should not set the property value
|
||||
Pass e.style['scrollbar-color'] = "auto auto" should not set the property value
|
||||
Pass e.style['scrollbar-color'] = "auto currentcolor" should not set the property value
|
||||
Pass e.style['scrollbar-color'] = "red" should not set the property value
|
||||
Pass e.style['scrollbar-color'] = "#FF0000" should not set the property value
|
|
@ -0,0 +1,26 @@
|
|||
<!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>
|
Loading…
Add table
Add a link
Reference in a new issue