Home / Companies / LogRocket / Blog / Post Details
Content Deep Dive

Using the StyleSheetManager component in styled-components 5.0

Blog post from LogRocket

Post Details
Company
Date Published
Author
Esteban Herrera
Word Count
1,211
Language
-
Hacker News Points
-
Summary

Styled-components version 5 introduces enhancements to the StyleSheetManager component, enabling more customization in CSS processing without breaking existing API functionality. Key updates include the disableCSSOMInjection property, which allows switching from the CSS Object Model (CSSOM) API to a text-node-based CSS injection system, and the disableVendorPrefixes property, which stops the automatic generation of browser-specific CSS prefixes for legacy support. Additionally, the stylisPlugins property lets developers apply plugins to customize how Stylis preprocesses CSS rules, with popular plugins such as stylis-plugin-rtl providing right-to-left text support. While these features increase flexibility, developers are advised to ensure compatibility and unique naming of plugins to avoid conflicts.