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

Adds CSS state for Chrome 125 #23072

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open

Conversation

rachelandrew
Copy link
Collaborator

Chrome is shipping the updated syntax, the old dashed ident syntax will be deprecated.

https://chromestatus.com/feature/5586433790443520

Is leaving the note the right thing to do here?

Chrome is shipping the updated syntax, the old dashed ident syntax will be deprecated.

https://chromestatus.com/feature/5586433790443520
@github-actions github-actions bot added the data:css 🎨 Compat data for CSS features. https://developer.mozilla.org/docs/Web/CSS label May 11, 2024
Co-authored-by: Hamish Willee <hamishwillee@gmail.com>
@hamishwillee
Copy link
Collaborator

@Elchi3 @queengooborg In the original spec you'd set a custom state by adding a dashed ident like --my-ident to a CustomStateSet, and then you'd match against that identifier in CSS using the ident: :--my-ident. The spec now says you don't need to use a dashed ident (though you can use whatever identifier you like with the new selector), and you match using the :state() selector function.

This update is good. My question is whether we need to somehow add a separate feature to indicate the dashed ident format, because this is still supported by current chrome, and we might want to show the deprecation path? No idea how you do that. Would be nice to avoid if we can using the note.

"version_added": false,
"notes": "From version 90 Chromium supports custom state selection using a dashed-ident (such as <code>:--foo</code>) instead of <code>:state()</code>."
"version_added": "125",
"notes": "Before version 125, custom state selection was supported using a dashed-ident (such as <code>:--foo</code>) instead of <code>:state()</code>."
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So not sure if this is "sufficient" as a note, and even if this is sufficient, it slightly implies that the dashed ident form is no longer allowed. I'm not messing with it because the BCD team know better than me.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @hamishwillee, I think you are proposing the following?
Do you want to make that change, @rachelandrew?

"chrome": [
  {
    "version_added": "125"
  },
  {
    "version_added": "90",
    "notes": "Supported using a dashed-ident (such as <code>:--foo</code>) instead of <code>:state()</code>."
  }
]

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If the deprecated syntax will ever get removed, we could then have:

"chrome": [
  {
    "version_added": "125"
  },
  {
    "version_added": "90",
    "version_removed: "200",
    "notes": "Supported using a dashed-ident (such as <code>:--foo</code>) instead of <code>:state()</code>."
  }
]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
data:css 🎨 Compat data for CSS features. https://developer.mozilla.org/docs/Web/CSS
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants