Limit attribute rules to input and select elements#159
Limit attribute rules to input and select elements#159thecrypticace merged 8 commits intotailwindlabs:mainfrom
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
Wrapping an existing portion of a selector in |
|
Honestly I think we should stick with the change from the original commit, where the element selector is bare but the attribute selector is wrapped in It does reduce the specificity from |
|
And this is why I tagged you — I thought there was a chance you might want to. |
| `input:where([type='checkbox']):checked:hover`, | ||
| `input:where([type='checkbox']):checked:focus`, | ||
| `input:where([type='radio']):checked:hover`, | ||
| `input:where([type='radio']):checked:focus`, |
There was a problem hiding this comment.
@adamwathan Should we put these pseudo classes inside :where(…)? I'm not sure.
There was a problem hiding this comment.
I think can just leave them out, were out before so at least the specificity wouldn't be changing.
|
Hey it's been a while since the last comment, any plans to push this forward? |
|
@thecrypticace is attempting to deploy a commit to the Tailwind Labs Team on Vercel. A member of the Team first needs to authorize it. |
|
Thank you so much for taking care of this @thecrypticace 💪 |
|
This has unfortunately "broken" all our checkboxes and radio boxes, where the checked state would not be visible anymore. While it's an easy fix, a warning within the release notes for a breaking change would have been great... |
Currently the rules for styling the inputs are too broad and may conflict with web components that use props named type or mutiple. This PR address this issue by using :where to select only inputs without change the specificity.