Skip to content

Commit

Permalink
Support ::scroll-button(*)
Browse files Browse the repository at this point in the history
Selector matches any ::scroll-button, recently added to spec.

Bug: 388538943
Change-Id: I5253f369ee1a6a5351f8064f4e238dfbf50a87dc
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6185896
Commit-Queue: Rune Lillesveen <[email protected]>
Reviewed-by: Daniil Sakhapov <[email protected]>
Cr-Commit-Position: refs/heads/main@{#1409581}
  • Loading branch information
lilles authored and chromium-wpt-export-bot committed Jan 22, 2025
1 parent 719c62b commit fb7ef79
Show file tree
Hide file tree
Showing 4 changed files with 41 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
test_invalid_selector('::scroll-button)');
test_invalid_selector('::scroll-button(');
test_invalid_selector('::scroll-button()');
test_invalid_selector('::scroll-button(*)');
test_invalid_selector('::scroll-button(\'up\')');
test_invalid_selector('::scroll-button(up, down)');
test_invalid_selector('::scroll-button(north)');
Expand Down
5 changes: 5 additions & 0 deletions css/css-overflow/parsing/parsing/scroll-buttons-valid.html
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,11 @@
test_valid_selector('::scroll-button(inline-start)');
test_valid_selector('::scroll-button(inline-end)');
test_valid_selector('::scroll-button(block-end)');
test_valid_selector('::scroll-button(*)');
test_valid_selector('::scroll-button( up)', '::scroll-button(up)');
test_valid_selector('::scroll-button(up )', '::scroll-button(up)');
test_valid_selector('::scroll-button( *)', '::scroll-button(*)');
test_valid_selector('::scroll-button(* )', '::scroll-button(*)');

// :focus
test_valid_selector('::scroll-button(up):focus');
Expand Down
19 changes: 19 additions & 0 deletions css/css-overflow/scroll-buttons-003.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
<!doctype html>
<meta charset="utf-8">
<title>CSS Test: ::scroll-button()s box creation with ::scroll-button(*)</title>
<link rel="match" href="scroll-buttons-001-ref.html">
<link rel="help" href="https://drafts.csswg.org/css-overflow-5/#scroll-buttons">
<style>
div::scroll-button(block-end), div::scroll-button(block-start) {
content: "";
}
div::scroll-button(*) {
background: green;
display: flex;
height: 50px;
width: 100px;
border: none;
}
</style>
<p>Test passes if there is a <strong>filled green rectangle</strong>.
<div></div>
17 changes: 17 additions & 0 deletions css/css-overflow/scroll-buttons-004.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
<!doctype html>
<meta charset="utf-8">
<title>CSS Test: ::scroll-button(*)s box creation</title>
<link rel="match" href="scroll-buttons-001-ref.html">
<link rel="help" href="https://drafts.csswg.org/css-overflow-5/#scroll-buttons">
<style>
div::scroll-button(*) {
content: "";
background: green;
display: flex;
height: 25px;
width: 100px;
border: none;
}
</style>
<p>Test passes if there is a <strong>filled green rectangle</strong>.
<div></div>

0 comments on commit fb7ef79

Please sign in to comment.