tailwindcss icon indicating copy to clipboard operation
tailwindcss copied to clipboard

Tailwind generates inappropriate class names for custom colors

Open sxdav opened this issue 1 month ago • 0 comments

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.

sxdav avatar Apr 18 '24 17:04 sxdav