We are planning to release 5.2 on September 2/3, please help us test!

yarn add styled-components@test
  • Preallocate global style placement to ensure cGS is consistently inserted at the top of the stylesheet; note that this is done in runtime order so, if you have multiple cGS that have overlapping styles, ensure they're defined in code in the sequence you would want them injected (see #3239)

    NOTE: This is a behavioral change and might require adjustment in your codebase if you have many createGlobalStyle components in use. We do not think it will affect the majority of projects other than fix existing bugs.

  • createGlobalStyle is now React.StrictMode compliant

  • Make sure StyleSheetManager renders all styles in iframe / child windows (see #3159) thanks @eramdam!

  • Rework how components self-reference in extension scenarios (see #3236); should fix a bunch of subtle bugs around patterns like & + &

  • Fix keyframes not receiving a modified stylis instance when using something like stylis-plugin-rtl (see #3239)

  • Big performance gain for components using style objects (see #3239)

  • We no longer emit dynamic classNames for empty rulesets, so some className churn may occur in snapshots

  • Add "engines" to package.json (currently set to Node 10, the oldest supported LTS distribution) (see #3201) thanks @MichaelDeBoey!


🚀 Github 镜像仓库 🚀



发行版本 101



贡献者 293



  • JavaScript 99.6 %
  • HTML 0.2 %
  • CSS 0.2 %