Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CssVars should not be camel-cased #1012

Closed
texels opened this issue Feb 1, 2019 · 2 comments
Closed

CssVars should not be camel-cased #1012

texels opened this issue Feb 1, 2019 · 2 comments
Labels
bug It went crazy and killed everyone. complexity:low You can fix it, c'mon!

Comments

@texels
Copy link

texels commented Feb 1, 2019

Expected behavior:
I tried to put a css variable into the jss object on the jss playground:
"--helloWorld" : "red",
I expected this to remain untouched. Instead it was converted to:
--hello-world: red;

Describe the bug:
css variables should not be camel-cased

Codesandbox link:
Enter this into the jss playground:

export default {
button: {
"--helloWorld" : "red",
border: '1px solid var( --helloWorld )',
}
};

Versions (please complete the following information):

Feel free to add any additional versions which you may think are relevant to the bug.

@kof
Copy link
Member

kof commented Feb 1, 2019

Oh I get it, you wrote camel cased custom prop, but because of the conversion you have to use a hyphenised version of it in (var()), so it becomes inconsistent from the consuming perspective, unless you write the first one also hyphenised.

yeah, I think we should not convert custom props

@kof kof added enhancement No kittens die if we don't do that. complexity:low You can fix it, c'mon! labels Feb 1, 2019
@HenriBeck HenriBeck added bug It went crazy and killed everyone. and removed enhancement No kittens die if we don't do that. labels Feb 1, 2019
@HenriBeck
Copy link
Member

Fixed in #1017. Will be in the next alpha

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug It went crazy and killed everyone. complexity:low You can fix it, c'mon!
Projects
None yet
Development

No branches or pull requests

3 participants