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 :has-slotted feature #2328

Merged
merged 2 commits into from
Nov 26, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
8 changes: 8 additions & 0 deletions features/has-slotted.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
name: :has-slotted
description: The `:has-slotted` CSS pseudo-class matches `<slot>` elements with any slotted content, including whitespace, text nodes, or elements. It can be used to determine that a `<slot>`'s fallback content is not displayed.
jamesnw marked this conversation as resolved.
Show resolved Hide resolved
spec: https://drafts.csswg.org/css-scoping-1/#the-has-slotted-pseudo
group:
- selectors
- web-components
compat_features:
- css.selectors.has-slotted
8 changes: 8 additions & 0 deletions features/has-slotted.yml.dist
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# Generated from: has-slotted.yml
# Do not edit this file by hand. Edit the source file instead!

status:
baseline: false
support: {}
compat_features:
- css.selectors.has-slotted
13 changes: 13 additions & 0 deletions features/slot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,16 @@ group:
- web-components
status:
compute_from: html.elements.slot
compat_features:
- api.Element.assignedSlot
- api.Element.slot
- api.HTMLSlotElement
- api.HTMLSlotElement.assignedElements
- api.HTMLSlotElement.assignedNodes
- api.HTMLSlotElement.name
- api.HTMLSlotElement.slotchange_event
- api.Text.assignedSlot
- css.selectors.slotted
- html.elements.slot
- html.elements.slot.name
- html.global_attributes.slot
4 changes: 0 additions & 4 deletions features/slot.yml.dist
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,3 @@ compat_features:
# safari: "10"
# safari_ios: "10"
- html.global_attributes.slot

# baseline: false
# support: {}
- css.selectors.has-slotted