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 is a very very basic version and WIP PR to add the
matchVariant
API.This allows you to register a variant using "arguments" (just like you can with
arbitrary value
plugins). The API would be something like this:This now allows you to pass an "argument" to the
group-hover
, e.g.:group-hover-[x]:underline group-hover-[y]:font-bold
. For this example, it would generate the following css:Now you can have "named" groups.
This feature is a missing piece in our set of exposed tools. We provide you with tools, one tool is a bit sharper than the other. It's up to you and your team to decide whether you want to use them and when to use them.
Here is a quick table overview on each tool and how "sharp" they are, don't hurt yourself!
bg-red-500
group-hover:underline
bg-[#1D9BF0]
(Twitter blue color)group-[focus]:underline
(* new in this PR)[scrollbar-gutter:stable]
[&>*]:underline
add those values to your configuration. You can use inline styles, but now this makes it a bit
easier for effects like "Make all logos gray until hovered"
bg-gray-100 hover:bg-[#1D9BF0]
.group-[focus]
can be used for cases where you want all the samegroup-X
logic, but justhave to use a one-off "state". Maybe this state doesn't exist in Tailwind CSS yet and is just
required here.
[scrollbar-gutter:stable]
is an arbitrary property. This is useful if Tailwind CSS ismissing some utilities and you still want to leverage all the capabilities from Tailwind CSS.
E.g.: when you want to change this property on hover
[scrollbar-gutter:stable] hover:[scrollbar-gutter:revert]
[&>*]:underline
is also an escape hatch that allows you to modify the selector to which theutilities should apply. This
&>*
is commonly known as thechildren
variant.The partial escape hatches are useful if you want to use the existing utility/variant but just want to change this one little part.
The full escape hatches are useful if Tailwind CSS doesn't provide the tools "natively" yet and if
you want to play with new CSS already or if you are just playing around before creating an actual
plugin.