Skip to content

Commit

Permalink
Add the :state() CSS pseudo-class
Browse files Browse the repository at this point in the history
  • Loading branch information
ddbeck committed Jul 9, 2024
1 parent f6171e4 commit d93569c
Show file tree
Hide file tree
Showing 2 changed files with 67 additions and 0 deletions.
17 changes: 17 additions & 0 deletions features/state.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
name: :state()
description: The `:state()` pseudo-class matches custom elements based on their custom state, set through the `ElementInternals.states` API.
spec: https://html.spec.whatwg.org/multipage/custom-elements.html#custom-state-pseudo-class
compat_features:
- css.selectors.state
- api.CustomStateSet
- api.CustomStateSet.@@iterator
- api.CustomStateSet.add
- api.CustomStateSet.clear
- api.CustomStateSet.delete
- api.CustomStateSet.entries
- api.CustomStateSet.forEach
- api.CustomStateSet.has
- api.CustomStateSet.keys
- api.CustomStateSet.size
- api.CustomStateSet.values
- api.ElementInternals.states
50 changes: 50 additions & 0 deletions features/state.yml.dist
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
# Generated from: state.yml
# Do not edit this file by hand. Edit the source file instead!

status:
baseline: low
baseline_low_date: 2024-05-17
support:
chrome: "125"
chrome_android: "125"
edge: "125"
firefox: "126"
firefox_android: "126"
safari: "17.4"
safari_ios: "17.4"
compat_features:
# baseline: low
# baseline_low_date: 2024-05-14
# support:
# chrome: "90"
# chrome_android: "90"
# edge: "90"
# firefox: "126"
# firefox_android: "126"
# safari: "17.4"
# safari_ios: "17.4"
- api.CustomStateSet
- api.CustomStateSet.@@iterator
- api.CustomStateSet.add
- api.CustomStateSet.clear
- api.CustomStateSet.delete
- api.CustomStateSet.entries
- api.CustomStateSet.forEach
- api.CustomStateSet.has
- api.CustomStateSet.keys
- api.CustomStateSet.size
- api.CustomStateSet.values
- api.ElementInternals.states

# ⬇️ Same status as overall feature ⬇️
# baseline: low
# baseline_low_date: 2024-05-17
# support:
# chrome: "125"
# chrome_android: "125"
# edge: "125"
# firefox: "126"
# firefox_android: "126"
# safari: "17.4"
# safari_ios: "17.4"
- css.selectors.state

0 comments on commit d93569c

Please # to comment.