Replies: 2 comments 1 reply
-
Note that this is a app level style solution? |
Beta Was this translation helpful? Give feedback.
0 replies
-
hi, do we already have a plan to enable supporting of Zero-runtime css? |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Motivation
Since emotion will serialize css every time token change, which is not consistent with the idea of css var, we need to switch to zero-runtime cssinjs to improve performance of our official website.
However, dynamic style is one of the advantage of cssinjs, so we try to get both benefits of zero-runtime and dynamic style by CSS variables.
Example
Detailed design
All dynamic parts of style could be replaced with
varFn
, which will generate a css var in style, making style itself static.And these css var will be placed on the root element of components, working for elements inside.
Drawbacks
Problems possibly need to be solve:
Beta Was this translation helpful? Give feedback.
All reactions