compiled icon indicating copy to clipboard operation
compiled copied to clipboard

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

Open itsdouges opened this issue 1 year ago • 0 comments

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):

  • OS: [e.g. iOS]
  • Browser [e.g. chrome, safari]
  • Version [e.g. 22]

Smartphone (please complete the following information):

  • Device: [e.g. iPhone6]
  • OS: [e.g. iOS8.1]
  • Browser [e.g. stock browser, safari]
  • Version [e.g. 22]

Additional context Add any other context about the problem here.

itsdouges avatar Apr 08 '24 02:04 itsdouges