JIT: Replace @tailwind screens
with @tailwind variants
#4356
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR adds a
@tailwind variants
directive as a replacement for the existing@tailwind screens
directive.The
@tailwind screens
directive has historically been used to control where responsive variants are inserted into the stylesheet. By default we append to the end, but there are some situations where you want to control it, so you have always been able to optionally stick@tailwind screens
in your stylesheet and we use that as the insertion point if it exists:In the JIT engine, there is no real difference between responsive variants or hover/focus/etc. variants — everything is simply a "variant" and all variants are grouped together, unlike in the classic engine where non-responsive variants are grouped per utility.
With this change, the name
@tailwind screens
no longer feels appropriate, so this PR adds@tailwind variants
which does the exact same thing but is better named.This will probably just sit around quietly as a sort of undocumented thing until 3.0 where we can push this as the recommended name, and deprecate the old one explicitly by showing a warning in the console.