-
Notifications
You must be signed in to change notification settings - Fork 5
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
Not possible to override custom colors with built in color #2
Comments
Can you share your |
module.exports = {
theme: {
transitionDuration: {
default: '300ms',
'0': '0ms',
'100': '100ms',
'200': '200ms',
'300': '300ms',
},
transitionDelay: {
default: '0ms',
'0': '0ms',
'100': '100ms',
'200': '250ms',
'300': '500ms',
},
extend: {
colors: {
app: {
primary: '#22859b',
'primary-dark': '#014e5e',
secondary: '#fc7244',
'secondary-dark': '#9e4629',
},
},
},
},
variants: {
backgroundColor: [
'responsive',
'first',
'last',
'odd',
'even',
'hover',
'focus',
'active',
'disabled',
'dark',
'dark:odd',
'dark:even',
'dark:hover',
'dark:focus',
'dark:active',
'dark:disabled',
],
borderColor: [
'responsive',
'first',
'last',
'odd',
'even',
'hover',
'focus',
'active',
'disabled',
'dark',
'dark:odd',
'dark:even',
'dark:hover',
'dark:focus',
'dark:active',
'dark:disabled',
],
textColor: [
'responsive',
'first',
'last',
'odd',
'even',
'hover',
'focus',
'active',
'disabled',
'dark',
'dark:odd',
'dark:even',
'dark:hover',
'dark:focus',
'dark:active',
'dark:disabled',
],
},
plugins: [require('tailwindcss-prefers-dark-mode')(), require('tailwindcss-transitions')()],
} |
I don´t understand exactly what are you trying to do. With your config colors, I am using this classes and everything is working as expected: By default border is default It is this behaviour which is not working for you? Perhaps you are trying to do something more advanced with Tailwind. |
Thanks for looking into this. The problem occurs when you try to override an extended color with a build in one (I think you tried the other way around). I think that it may be a bug in tailwind, the way that it implements BTW: this plugin is working really well, thanks for taking the time to make and publish it! |
Ok, I suppose you can open an issue in TailwindCSS repo. Thanks! |
When extending the tailwind colors and using one the the custom colors, it is not possible to override with a built in color. For example the following does not work.
The workaround is to remove 'dark:border-my-custom-color', but I would expect it to be possible to override both built in and extended colors with either built in or extended colors.
The text was updated successfully, but these errors were encountered: