-
-
Notifications
You must be signed in to change notification settings - Fork 173
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
Make use of CSS :has()
#6844
base: v5/develop
Are you sure you want to change the base?
Make use of CSS :has()
#6844
Conversation
I wonder if we should switch the css rules, but still keep the data attributes a little longer. They migth still be useful as hooks for custom styles. |
I'd love to steer people away from these data attributes as soon as possible. |
Removing the data attributes will be huge breaking change for many projects. Make sure to communicate this loudly if you proceed in that direction. It's a good idea in general 👍 but it will be disruptive for existing projects 🚨 |
We of course need to communicate it properly. That's why they're all listed as breaking changes in the initial post. I am still wondering if these specific data attributes are really used in "many projects". What are the use cases in projects for these? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it's good to clean up, but there are parts that are easier to read with the data attributes (in my opinion) or provide a bit more selector safety. I've tried to go through all the different changes and comment accordingly. I hope it helps to get this done.
5f08d6a
to
7f6a300
Compare
Description
Reasoning
We already have started again to use
:has()
in many places. It might be time to bring all these back as well. I couldn't notice any performance issues in Firefox this time.Changelog
Breaking changes
<k-item>
: Removeddata-only-option
attributes<k-dialog>
: Removeddata-has-footer
attribute<k-toggles-input>
: Removeddata-disabled
attribute<k-writer-input>
: Removeddata-toolbar-inline
attribute<k-bubble>
: Removeddata-has-text
attribute<k-header>
: Removeddata-has-buttons
attribute<k-tag>
: Removeddata-has-image
anddata-has-toggle
attributes<k-tree>
: Removeddata-has-subtree
attributeReady?
For review team