-
-
Notifications
You must be signed in to change notification settings - Fork 399
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
[jss-plugin-camel-case] Support css vars better #1017
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
kof
approved these changes
Feb 2, 2019
kof
reviewed
Feb 2, 2019
@@ -12,7 +12,9 @@ function convertCase(style) { | |||
const converted = {} | |||
|
|||
for (const prop in style) { | |||
converted[hyphenate(prop)] = style[prop] | |||
const key = prop.startsWith('--') ? prop : hyphenate(prop) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
created a bench, https://esbench.com/bench/5c55f3b54cd7e6009ef620ec
prop[0] === '-' && prop[1] === '-'
seems to be much faster, its on a level where it probably doesn't matter but still kinda nice to have
HenriBeck
pushed a commit
that referenced
this pull request
Feb 2, 2019
…g' into feat/themed-styles-misuse-warning * origin/feat/themed-styles-misuse-warning: [react-jss] Export the context as __Context from react-jss (#1014) [jss-plugin-camel-case] Support css vars better (#1017) [docs] Add badges to readmes (#1016) Revert "Add tests for css variables in camel case plugins" Revert "Fix css variables being hyphenated" Revert "Run prettier" Run prettier Fix css variables being hyphenated Add tests for css variables in camel case plugins
HenriBeck
pushed a commit
that referenced
this pull request
Feb 12, 2019
… update-jss-types * jss-plugin-rule-value-function/fix-process-styles: (35 commits) Add formatting TS files Update typings Use types jss definitions Fix TS type definitions (#1030) v10.0.0-alpha.10 Update publish scripts (#1027) [docs] Update SSR setup with react-jss (#1018) temporarily remove the link to the docs, we need perma links instead #1006 [jss] Update SheetsManager (#1019) warn consumers if themed styles are misused. fix #1005 (#1006) Added TypeScript Usage documentation for React JSS (#1009) [react-jss] Export the context as __Context from react-jss (#1014) [jss-plugin-camel-case] Support css vars better (#1017) [docs] Add badges to readmes (#1016) Revert "Add tests for css variables in camel case plugins" Revert "Fix css variables being hyphenated" Revert "Run prettier" Run prettier Fix css variables being hyphenated Add tests for css variables in camel case plugins ... # Conflicts: # packages/jss/src/index.d.ts
bhupinderbola
pushed a commit
to bhupinderbola/jss
that referenced
this pull request
Sep 17, 2019
* Add failing tests * Fix tests * Update changelog * Format code
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
What would you like to add/fix?
Currently, css variables are also being hyphenated.
Corresponding issue (if exists): #1012