Skip to content

Remove automatic camel-casing of CSS custom properties #73

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

necolas
Copy link
Contributor

@necolas necolas commented Apr 3, 2024

Thinking we should first update internal theme configs for native so that they don't rely on this transform. Then we can merge the PR and safely sync.

Fix #50

Copy link

github-actions bot commented Apr 3, 2024

compressed-size: runtime library

Size change: -0.02 kB
Total size: 18.84 kB

Filename: gzip (minify) kB size kB change % change
./packages/react-strict-dom/dist/native/index.js 14.91 (46.59) -0.02 (-0.08) -0.2% (-0.2%) 🟢
View unchanged
Filename: gzip (minify) kB size kB change % change
./packages/react-strict-dom/dist/dom/index.js 2.99 (8.99) 0.00 (0.00) 0.0% (0.0%)
./packages/react-strict-dom/dist/dom/runtime.js 0.95 (2.33) 0.00 (0.00) 0.0% (0.0%)

Copy link
Contributor

@vincentriemer vincentriemer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Copy link
Contributor

@nmn nmn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM as well!

@Victor1890
Copy link

LGTM

@necolas necolas force-pushed the fix-css-vars-no-camelize branch from 2f33fd9 to 60710ee Compare April 18, 2024 17:48
necolas added a commit that referenced this pull request Jul 2, 2025
StyleX on web has a feature that prevents auto-generation of scope CSS
var names by `defineVars`, if the user-provided var key is a string that
starts with `--`.

Adding support for this involves removing the legacy feature that
converted kebab-case variable names to camelCase. Therefore, it's a
breadking change that requires modification to the customProperties map
passed to the legacy ThemeProvider context.

Close #73
Fix #50
necolas added a commit that referenced this pull request Jul 2, 2025
StyleX on web has a feature that prevents auto-generation of scoped CSS
var names created by `defineVars`. If the user-provided var key is a
string that starts with `--`, the key is preserved as-is and its value
can even be redefined in other `defineVars` calls.

Adding support for this on native involves removing the legacy feature
that converted kebab-case variable names to camelCase. Therefore, it's a
breaking change that requires users to modify to the `customProperties`
map (adding `--` prefix to all keys) passed to any use of the legacy
`ThemeProvider` context.

Close #73
Fix #50
necolas added a commit that referenced this pull request Jul 3, 2025
StyleX on web has a feature that prevents auto-generation of scoped CSS
var names created by `defineVars`. If the user-provided var key is a
string that starts with `--`, the key is preserved as-is and its value
can even be redefined in other `defineVars` calls.

Adding support for this on native involves removing the legacy feature
that converted kebab-case variable names to camelCase. Therefore, it's a
breaking change that requires users to modify to the `customProperties`
map (adding `--` prefix to all keys) passed to any use of the legacy
`ThemeProvider` context.

Close #73
Fix #50
necolas added a commit that referenced this pull request Jul 9, 2025
StyleX on web has a feature that prevents auto-generation of scoped CSS
var names created by `defineVars`. If the user-provided var key is a
string that starts with `--`, the key is preserved as-is and its value
can even be redefined in other `defineVars` calls.

Adding support for this on native involves removing the legacy feature
that converted kebab-case variable names to camelCase. Therefore, it's a
breaking change that requires users to modify to the `customProperties`
map (adding `--` prefix to all keys) passed to any use of the legacy
`ThemeProvider` context.

Close #73
Fix #50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Remove automatic camel-casing of CSS custom property names
5 participants