Workday / canvas-kit

Development kits to implement UI following the Workday Canvas Design System (https://canvas.workday.com/). See our Component Storybook -
https://workday.github.io/canvas-kit/
Apache License 2.0
301 stars 221 forks source link

fix: Enable styling compat mode to ensure proper style merging #2890

Closed mannycarrera4 closed 2 months ago

mannycarrera4 commented 2 months ago

Summary

Enable compat mode all the time to ensure correct style merging regardless of environment. For more information, reference our discussion

Release Category

Infrastructure

Release Note

We're seeing style merging issues when using createStyles or createStencil. It only happens when every style override of the element uses these utilities and @emotion/react or @emotion/styled is not used on the same element. These utilities rely on module execution order and we're having a few reports where modules are possibly executing out of order. In order to allow everyone to use createStyles and createStencil without worrying about style merge issues, we're going to enable compat mode all the time. We'll look into possible out-of-order execution issues in the future and plan to re-enable full static mode (for better performance) once we know why this is happening and have a proper workaround.

For more information, please read our discussion