-
Notifications
You must be signed in to change notification settings - Fork 4.4k
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
Create variants for aria
, supports
, and data
JS config theme keys
#14407
Create variants for aria
, supports
, and data
JS config theme keys
#14407
Conversation
aria
, supports
, and data
JS theme keysaria
, supports
, and data
JS config theme keys
Should we actually replace the root data/supports/aria variants here maybe so all the custom ones stay grouped with the arbitrary ones in the generated CSS? |
94e557a
to
ab305dd
Compare
Can you think of ways where the grouping would be important here? I feel like it would be weird to replace core utilities that are perfectly functioning. Makes it feel brittle because we could create a wrong implementation at any of the two places now or we forget to update one, etc. |
ab305dd
to
41d2606
Compare
@philipp-spiess Here's an example of where it would be a breaking change: v3 registering https://play.tailwindcss.com/noQ9ZX69LZ v4 adding a new separate https://play.tailwindcss.com/qFyxAsRDt6 Likelihood of affecting anyone is quite small realistically but it is technically a breaking change. Another option is to explicitly register the custom ones with the same |
@adamwathan Ahh, thank you for the examples, I see the issue now 🤕. Yea we'd have to make it so that we can overwrite the We could make it work I think by kinda like "patching" the default functional variants? It seems like overwriting a utility does not change it's order! Let me try something. 👀 Edit: I realize this is probably what you have meant by your initial comment all along 🤦 |
41d2606
to
669fd15
Compare
@adamwathan Check out this tech: 5dcb301 |
5dcb301
to
95f7cc6
Compare
95f7cc6
to
d3143b9
Compare
Had a really old review I started and forgot to submit so just submit it now before I forget, probably had some outdated stuff and haven’t looked at everything yet either, on phone heh. |
Co-authored-by: Adam Wathan <adam.wathan@gmail.com>
This PR adds support for the
aria
,supports
, anddata
properties found in JS config options. In v3, you could extend the theme to add more variants by using an object syntax like this:Since we no longer rely on theme variables for these variants, the way to make this work is by adding custom variants for each of these manually added variants.