You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Adding css variables directly in css or via @layer does not seem to be affected. Examples:
@layer base {
/* this works fine */
.neon {
--colors-secondaryThing-500:144,160,64;
}
}
/* this works fine */
.dark {
--colors-secondaryThing-500:139,0,0;
--colors-primaryThing-500:0,0,139;
}
What version of Tailwind CSS are you using?
v3.0.8
What build tool (or framework if it abstracts the build tool) are you using?
Create react app v5
What version of Node.js are you using?
16.13.0
What browser are you using?
N/A
What operating system are you using?
Ubuntu 20.04 WSL
Reproduction URL
https://github.com/RyanClementsHax/tailwindcss-css-variable-casing-bug
Describe your issue
addBase
silently changes css variable casing from camelCase to kebab-case. Other methods of adding css variables seem to be unaffected.The following code generates the following css.
Adding css variables directly in css or via
@layer
does not seem to be affected. Examples:All of the above examples are in the minimal reproduction repo
Use case
I wrote a theming plugin that automatically generates css variables. Changing casing under the hood causes unexpected outputs.
P.S. thanks for such a great library :)
The text was updated successfully, but these errors were encountered: