tailwindcss
tailwindcss copied to clipboard
Tailwind generates inappropriate class names for custom colors
Discussed in https://github.com/tailwindlabs/tailwindcss/discussions/13547
Originally posted by sxdav April 18, 2024 I'm trying to add css vars aliases to the config like that:
const config: Config = { theme: { colors: { '-bg-primary': 'var(--bg-primary)' } } }
Idea is to use them as bg--bg-primary
, similar to css vars syntax. But tailwind generates a -bg-bg-primary
class which contains background-color: var(--bg-primary);
, instead of bg--bg-primary
which does not seems like an expected behavior.