Replies: 2 comments 1 reply
-
Hey! In Tailwind 2.0, the Try and update that to module.exports = {
theme: {
colors: {
foo: {
- default: '#6F4CFF'
+ DEFAULT: '#6F4CFF'
100: '#F1EDFF',
200: '#DBD2FF',
// rest of config |
Beta Was this translation helpful? Give feedback.
-
Hello @simonswiss.
Here's my theme // tailwind.config.js
module.exports = {
purge: ['./src/**/*.svelte'],
theme: {
extend: {
colors: {
primary: {
light: '#FFC259',
DEFAULT: '#F59E0B',
dark: '#A36700'
}
}
}
},
variants: {},
plugins: []
} Then the component using the new color: <style type="postcss">
nav {
@apply w-full py-2 px-4 border-b text-center border-primary;
} And the final error is
Using the utility class in the markup works fine, the limitation is only when applying it. Any ideas are welcome! |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
I've just upgraded to Tailwind 2 and I'm stuck with this error.
It relates to this block in my main.css
In my
tailwind.config.js
I have the following defining my custom colour palette:It seems like when I remove the offending line the classes work when used in the rendered html.
I'm using Tailwind with an ejected CRA so am using postcss 8 and autoprefixer 10. The relevant bit of webpack config looks like:
This was working fine with Tailwind 1. Any ideas why it's now broken?
Thanks for the amazing library.
Beta Was this translation helpful? Give feedback.
All reactions