-
Notifications
You must be signed in to change notification settings - Fork 313
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
Don't use Custom Properties to implement dynamic styles #800
Comments
Just adding some details for this task. When inline styles are possible
The trade-offs
Performance
|
Is this being worked (who is "we") on or just promised? What does "inline their usage" mean in this context - is it the same as #737 or something else?
Global CSS selectors? I don't follow
What's the relevance here? |
No, this is to detect CSS variables defined with We obviously want to work
There are some rare cases in our codebase where we use CSS files to override the "base" styles applied by StyleX.
A lot of devs assume inline styles are slower. This is just evidence that shows that inline styles are not slower than atomic CSS. |
Describe the feature request
When using inline styles directly, you don't incur the runtime cost of using custom properties to back the dynamic values of properties. For most dynamic use cases, we can simply render inline styles without using custom properties or creating additional generated CSS. There are runtime and bundle size wins to be had there.
The text was updated successfully, but these errors were encountered: