-
-
Notifications
You must be signed in to change notification settings - Fork 2.6k
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
🐛 BUG: Tailwind custom colours don't get applied #3043
Comments
The issue might lie with the Tailwind integration but further testing will be needed to confirm this |
Interestingly, the custom colours do work in the Tailwind Typography plugin... I was trying to use CSS variables as custom colours. They don't show up when I use the
|
Same Issue here, I am not sure if my colors are overwritten, but I can't add new spacings as an extension |
@CEbbinghaus have you tried experimenting with disabling the astro preset as documented here? Of course this means you have to set up Fix demo here: https://stackblitz.com/edit/github-zywnbf-mfmbkx?file=astro.config.mjs |
@Barnabas that did indeed fix it but I am wondering if it wouldn't make more sense to prioritise the provided config over the default configuration. so something like |
Yeah that fixed it for me as well. |
sweet thanks so much. very cool |
What version of
astro
are you using?1.0.0-beta.5
What package manager are you using?
pnpm
What operating system are you using?
Windows 11
Describe the Bug
Tailwind lets you define custom colours/themes in the tailwind.config.js file. These are then used in place of the default colours and can be used all the same. This can be seen here with the ability to change the colour theme whenever desired to whatever colours. However, in Astro, this very same behaviour seems to be broken. Colours won't show up and when used inside the @apply directive it even throws an error that the class doesn't exist. An issue similar to this is in the Tailwind repo (here tailwindlabs/tailwindcss/issues/396) however all of those people's problems were solved by simply adding the colour into the configuration however the problem here seems to be that the configuration colours aren't fully respected.
Link to Minimal Reproducible Example
https://stackblitz.com/edit/github-zywnbf?file=src/pages/index.astro
Participation
The text was updated successfully, but these errors were encountered: