-
-
Notifications
You must be signed in to change notification settings - Fork 4.8k
Migrate supports
theme keys
#18817
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
Migrate supports
theme keys
#18817
Conversation
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.
👋 bye bye blocked theme keys
We still have aria
, data
and supports
handling in: https://github.com/tailwindlabs/tailwindcss/blob/feat%2Fupgrade-supports-theme/packages/tailwindcss/src/compat/theme-variants.ts
This is still necessary in case the config file could not be migrated due to other issues. So didn't get rid of that part.
17b2f0a
to
0e1549a
Compare
ef9163d
to
577d0f4
Compare
0e1549a
to
a08cb3d
Compare
577d0f4
to
889aefd
Compare
a08cb3d
to
894143b
Compare
Co-Authored-By: Jordan Pittman <thecrypticace@gmail.com>
889aefd
to
7a3e1c3
Compare
This PR is a follow up of #18815 and #18816, but this time let's migrate the
supports
theme keys.Let's imagine you have the following Tailwind CSS v3 configuration:
Then we would generate the following Tailwind CSS v4 CSS:
Notice how we didn't generate a custom variant for
data-foo
ordata-bar
because those are automatically handled by bare values.I also went with the longer form of
@custom-variant
, we could use the single selector approach, but that felt less clear to me.