extended colors (in object format) including a default color name gets replaced with the default colors value
See original GitHub issuein tailwind.config.js if you define a color, with a name including a default colors name in object format, gets the value of the default color.
ie.
module.exports = { theme: { extend: { colors: { 'my-blue': { 100: '#2200ff' } } } } }
There is a class blue-100
in tailwind default color palette. So when you use my-blue-100
twin.macro uses that color value instead of the one defined in this config.
That looks like a regex issue I think. It happens in text-color, bg-color or border-color.
Here is the sample forked from the starter. https://codesandbox.io/s/next-emotion-tailwind-twin-starter-tf34f?file=/tailwind.config.js
Thanks @regenrek for giving point to when color definition is an object not a string.
Issue Analytics
- State:
- Created 3 years ago
- Reactions:1
- Comments:7 (4 by maintainers)
This match bug was fixed in 1.5.1 🎉
Feel free to reopen the issue if there’s any problems.
@avinash-BB I couldn’t see any issues using custom colors, check out this demo here