-
Notifications
You must be signed in to change notification settings - Fork 59
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
Prefix based on hyphen prop(not camel case) #201
Comments
Apparently, no. This library aims to prefix inline-style and/or CSS-in-JS style objects which are written in camelCase as that's what the browser APIs default to. In what use-case do you work with kebab-cased properties that need prefixes? I guess you could check out the prefixer from stylis, which operates on kebab-cased properties instead. |
Hi @robinweser thank you for your answer. For browser APIs, which one are you referring to? Currently I found camelCase is only used for setting inline styling for component, and I have to use kebab-case set css on a stylesheet with js, through Ok I think the meaning of the name of this package again after I have written that, I guess I get your point now. |
So, this package was originally created for React inline styles which are written in camelCase. Then it got adapted by many CSS-in-JS libraries (especially those operating on objects) and all of those use camelCase properties as well, mainly because it's more readable and easy-to-type in JavaScript. |
Is it possible to make inline-style-prefixer prefix based on hyphen prop instead of camelCase? By doing so, I dont have to convert users' input from hyphen to camel-case to hyphen again, thus enhancing the overall performance
The text was updated successfully, but these errors were encountered: