Skip to content

[css-selector-for-is-attribute] Feature Request #9973

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

Closed
clarumedia opened this issue Feb 17, 2024 · 3 comments
Closed

[css-selector-for-is-attribute] Feature Request #9973

clarumedia opened this issue Feb 17, 2024 · 3 comments

Comments

@clarumedia
Copy link

Please accept my apologies if this is already a topic, feature, or I have submitted this request incorrectly.

RFC to support CSS attribute selector to target custom components via the "is" attribute.

input[is=my-custom-component]
color:red;
}

FWIW: I prefer the "is" attribute eg: because I think it degrades better than in situations where the JS code may have failed etc.

Many thanks

@Loirooriol
Copy link
Contributor

It's hard to tell what you are asking for, this already works:

<style>
input[is=my-custom-component] {
  color: red;
}
</style>
<input is="my-custom-component" value="This is red">

@Loirooriol Loirooriol added the selectors-4 Current Work label Feb 17, 2024
@clarumedia
Copy link
Author

You're absolutely right. My bad !
The "is" attribute rocks !
Many thanks for your response.

@clarumedia
Copy link
Author

Thank you

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants