Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add tests for ::slotted(*)::file-selector-button #49407

Merged
merged 2 commits into from
Nov 27, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions css/css-scoping/slotted-file-selector-button-ref.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
<!doctype html>
<style>
::file-selector-button { color: green }
</style>
<p>Test passes if ::file-selector-button has green text.</p>
<input type="file">
18 changes: 18 additions & 0 deletions css/css-scoping/slotted-file-selector-button.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
<!doctype html>
<meta charset="utf-8">
<title>CSS Scoping Test: ::slotted() allows ::file-selector-button</title>
<link rel="author" title="Tim Nguyen" href="https://github.com/nt1m">
<link rel="help" href="https://drafts.csswg.org/css-scoping/#slotted-pseudo">
<link rel="match" href="slotted-file-selector-button-ref.html">
<p>Test passes if ::file-selector-button has green text.</p>
<div id="host">
<input type="file">
</div>
<script>
host.attachShadow({ mode: "open" }).innerHTML = `
<style>
::slotted(*)::file-selector-button { color: green }
</style>
<slot></slot>
`;
</script>
1 change: 1 addition & 0 deletions css/css-scoping/slotted-parsing.html
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@
test_valid_selector("::slotted(*)::before");
test_valid_selector("::slotted(*)::after");
test_valid_selector("::slotted(*)::details-content");
test_valid_selector("::slotted(*)::file-selector-button");
test_valid_selector("::slotted(*)::placeholder");
test_valid_selector("::slotted(*)::marker");

Expand Down