atlassian-labs / compiled

A familiar and performant compile time CSS-in-JS library for React.
https://compiledcssinjs.com
Apache License 2.0
1.98k stars 68 forks source link

Using css variables in style declarations are always converted to kebab-case #1654

Open itsdouges opened 4 months ago

itsdouges commented 4 months ago

Describe the bug

When writing css variables that aren't kebab case, for example camelCase or snake_case, Compiled ends up transforming it to kebab-case.

To Reproduce

const styles = cssMap({
  '--helloWorld': 'red',
});

The output css variable is --hello-world.

Expected behavior

--helloWorld: red; stays as --helloWorld: red;.

Screenshots If applicable, add screenshots to help explain your problem.

Desktop (please complete the following information):

Smartphone (please complete the following information):

Additional context Add any other context about the problem here.