You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am attempting to add a custom variant to our twin config. In the 2.x branch we were actually patching twin to add support for this, but now that 3.x supports plugins we are hoping to move to the officially supported happy path. The variant we are adding is the following:
For some reason addVariant('gp-sm', ['.gp-sm &:not(.responsive-blocker \\&)', '.responsive-blocker .gp-sm &']); appears to work fine. I dont know why I need to double escape any ampersand after the first one.
Tailwindcss versions prior to [email protected] produced the output you were after.
I'm unsure why the functionality was changed but I can see there was a bit of work done with variants in the changelog.
I am attempting to add a custom variant to our twin config. In the 2.x branch we were actually patching twin to add support for this, but now that 3.x supports plugins we are hoping to move to the officially supported happy path. The variant we are adding is the following:
I've also tried expressing it thusly:
This produces invalid results for the second
&
in the first selector. You can see in the tailwind playground the correct selectors are produced: https://play.tailwindcss.com/zqDJvNIcDK?file=configHowever when twin attempts to produce the selectors, you get something like
grid-cols-2
is the tailwind class I was applying, but it has been improperly substituted formy-class-name
.The text was updated successfully, but these errors were encountered: