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
Using @apply
with any class that sets @defaults
(transforms/filters/rings/border) doesn't work in CSS modules/Svelte components/Vue components
#6409
Comments
It seems others are experiencing other issues with tailwind v3 and the
|
Just a note for myself, this is likely because CSS modules are processed in isolation and Tailwind doesn’t know to collect the class name of the class using apply and add it to the Likely the best solution to this particular problem is to document what’s happening and explain the workaround which would involve explicitly including a border color when using |
Not trying to interject on your personal note; my team is using the workaround of explicitly including a border color when using Thanks for explaining the technical portion of the problem! |
@apply
rather than inline classNames results in different border colors in v3, and not v2@apply
with any class that sets @defaults
(transforms/filters/rings) doesn't work in CSS modules/Svelte components/Vue components
I've updated the title to better reflect the underlying issue so others can find it, going to tag a patch this morning that mitigates it with a bandaid solution until we can come up with something better 👍🏻 |
@apply
with any class that sets @defaults
(transforms/filters/rings) doesn't work in CSS modules/Svelte components/Vue components@apply
with any class that sets @defaults
(transforms/filters/rings/border) doesn't work in CSS modules/Svelte components/Vue components
Hey folks! We've patched a fix for this in v3.0.2 👍 It involved disabling this new |
Thank you for addressing this quickly and for the updates! |
Thanks for the quick fix, for the transform it works now.
--tw-filter is not getting generated.
Is there still a problem or am I doing it wrong? |
@adamwathan just checked, works in Chrome still broken in Safari |
First, thank you for this awesome tool. Tailwind is amazing!
What version of Tailwind CSS are you using?
v3.0.1
What build tool (or framework if it abstracts the build tool) are you using?
next: 12.0.7
postcss: 8.4.4
autoprefixer: 10.4.0
What version of Node.js are you using?
v16.13.0 and v14.18.x
What browser are you using?
Chrome, Safari, Brave
What operating system are you using?
macOS
Reproduction URL
Reproduction repo
Describe your issue
When applying the same tailwind
border
class to an element, the border color differs depending on how the styles are applied. Using CSS modules with@apply
, the border color will be black, but when applying tailwind classes inline, the border will be gray (or the default color in the tailwind config). In tailwind v2, this was not a bug. And the update guide to v3 did not mention this as a breaking change. Thanks!home.module.css
index.tsx
tailwind.config.js
Here the default border color property is set in the tailwind config.
Here no default border color property is set
Downgrading to v2 works as expected.
Here the default border color property is set in the tailwind config.
Here no default border color property is set
The text was updated successfully, but these errors were encountered: