-
I originally created a Tweet for this but then figured it would be better to use the forums in case someone else is facing the same issue. I have always used the Tailwind default colours but now I'm working on a project that requires custom colour values. After looking at the Tailwind documentation, I overriden some colour values (e.g. blue), however this breaks other non-set values (they don't work at all - e.g. bg-transparent and text-white)? I'm probably missing something minor. I have tried to import all the default colours and only override the ones I need to like so: I tried to do this:
This throws an error when I run https://tailwindcss.com/docs/customizing-colors/#disabling-a-default-color This is what I have in my tailwind.config.js file:
|
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 2 replies
-
Oh, I figured it out... It is now really obvious and a very silly mistake. I had |
Beta Was this translation helpful? Give feedback.
-
If all you're wanting to do is update certain colors in the default config, than you'll want to use
The method you're currently using where you import all the colors and then overwrite them as needed is only best if you want to remove some of the colors entirely from the config - otherwise it's more error-prone and messy than just using |
Beta Was this translation helpful? Give feedback.
Oh, I figured it out... It is now really obvious and a very silly mistake. I had
colours: {...}
outside of theextend: {}
It's just gone 2 AM here, time to sleep and rest my brain ready for more coding tomorrow! 😁