Releases: styled-components/styled-components
v6.0.1
Fixed an issue where a dev-time warning was being triggered too eagerly.
Full Changelog: v6.0.0...v6.0.1
v6.0.0
yarn add styled-components
Changed in this version
- fix(types): prevent prop bleed on styling properties (fixes #4053, c0f8015)
- feat(types): ship csstype via "CSS" namespace (e6c4f0a)
- chore: bump stylis to 4.3 (fixes #4007, fa58875)
- reduced some sources of unnecessary branching logic
Breaking changes in v6
Migration guide → https://styled-components.com/docs/faqs#what-do-i-need-to-do-to-migrate-to-v6
- now using
stylis
v4 (if usingstylis-plugin-rtl
you'll need to upgrade to the newer version) - styled-components now provides its own types; if you installed
@types/styled-components
in the past, you'll want to remove it - dropped
$as
and$forwardedAs
props (useas
orforwardedAs
) - dropped automatic prop filtering; use transient props (
$
prefix) for stuff you don't want to be passed to child component / HTML StyleSheetManager
- replaced
disableVendorPrefixes
withenableVendorPrefixes
prop - dropped automatic vendor prefixing; if you need to support older browsers, you can re-enable it easily with the above prop
<StyleSheetManager enableVendorPrefixes> {/* your React tree and ThemeProvider goes here */} </StyleSheetManager>
- replaced
- dropped deprecated
withComponent
API (87f511a); use "as" prop instead - node >= 14 needed
Full Changelog: v5.3.7...v6.0.0
v6.0.0-rc.6
yarn add styled-components
Changed in this version
- fix: stylis types are now included as a direct dependency #4051 (235a62b)
- refactor: simplify code related to style tag injection #4040 (c3939a4)
- chore: don't warn if shouldForwardProp is in use and the prop is forwarded (00ab9c4)
Breaking changes in v6
Migration guide → https://styled-components.com/docs/faqs#what-do-i-need-to-do-to-migrate-to-v6
- now using
stylis
v4 (if usingstylis-plugin-rtl
you'll need to upgrade to the newer version) - styled-components now provides its own types; if you installed
@types/styled-components
in the past, you'll want to remove it - dropped
$as
and$forwardedAs
props (useas
orforwardedAs
) - dropped automatic prop filtering; use transient props (
$
prefix) for stuff you don't want to be passed to child component / HTML StyleSheetManager
- replaced
disableVendorPrefixes
withenableVendorPrefixes
prop - dropped automatic vendor prefixing; if you need to support older browsers, you can re-enable it easily with the above prop
<StyleSheetManager enableVendorPrefixes> {/* your React tree and ThemeProvider goes here */} </StyleSheetManager>
- replaced
- dropped deprecated
withComponent
API (87f511a); use "as" prop instead - node >= 14 needed
Full Changelog: https://github.com/styled-components/styled-components/compare/v6.0.0-rc.5..v6.0.0-rc.6
v6.0.0-rc.5
yarn add styled-components
Changed in this version
- Compatibility with frozen Object prototype, part 2 by @jportner in #4042
- ensure useTheme hook returns theme object by @nksfrank in #4033
- revert rc.3 type changes, investigate alternate fixes by @probablyup in #4037
- finalize rc.4 inclusions by @probablyup in #4047
- object styles now have strong typing
- add dev-time warning if
enableVendorPrefixes
needs to be enabled based on prop usage
New Contributors
Breaking changes in v6
Migration guide → https://styled-components.com/docs/faqs#what-do-i-need-to-do-to-migrate-to-v6
- now using
stylis
v4 (if usingstylis-plugin-rtl
you'll need to upgrade to the newer version) - styled-components now provides its own types; if you installed
@types/styled-components
in the past, you'll want to remove it - dropped
$as
and$forwardedAs
props (useas
orforwardedAs
) - dropped automatic prop filtering; use transient props (
$
prefix) for stuff you don't want to be passed to child component / HTML StyleSheetManager
- replaced
disableVendorPrefixes
withenableVendorPrefixes
prop - dropped automatic vendor prefixing; if you need to support older browsers, you can re-enable it easily with the above prop
<StyleSheetManager enableVendorPrefixes> {/* your React tree and ThemeProvider goes here */} </StyleSheetManager>
- replaced
- dropped deprecated
withComponent
API (87f511a); use "as" prop instead - node >= 14 needed
Full Changelog: https://github.com/styled-components/styled-components/compare/v6.0.0-rc.3..v6.0.0-rc.5
v6.0.0-rc.3
- fix(types): several regression fixes and improved CSSProp typing by @justinbhopper, @aliceHendicott, @probablyup in #4028
- fix(stylis): ensure rules are split coming out of stylis by @probablyup in #4021 (this is a partial fix for #4007, the remainder requires thysultan/stylis#315)
Full Changelog: v6.0.0-rc.2...v6.0.0-rc.3
v5.3.11
Removed use of the useDebugValue
hook to rectify older React support.
Full Changelog: v5.3.10...v5.3.11
v6.0.0-rc.2
yarn add styled-components
Changed in this version
- fix(types): perf issue with large union types by @justinbhopper in #4011
- fix(types): resolve deficiencies in the attr typings, and many other type improvements by @justinbhopper, @aliceHendicott, @probablyup in #4014
New Contributors
- @justinbhopper made their first contribution in #4011
Upcoming
- v6 migration documentation
Breaking changes in v6
- now using
stylis
v4 (if usingstylis-plugin-rtl
you'll need to upgrade to the newer version) - styled-components now provides its own types; if you installed
@types/styled-components
in the past, you'll want to remove it - dropped
$as
and$forwardedAs
props (useas
orforwardedAs
) - dropped automatic prop filtering; use transient props (
$
prefix) for stuff you don't want to be passed to child component / HTML StyleSheetManager
- replaced
disableVendorPrefixes
withenableVendorPrefixes
prop - dropped automatic vendor prefixing; if you need to support older browsers, you can re-enable it easily with the above prop
<StyleSheetManager enableVendorPrefixes> {/* your React tree and ThemeProvider goes here */} </StyleSheetManager>
- replaced
- dropped deprecated
withComponent
API (87f511a); use "as" prop instead - node >= 14 needed
Full Changelog: v6.0.0-rc.1...v6.0.0-rc.2
v6.0.0-rc.1
yarn add styled-components
Changed in this version
- bump stylis to 4.2.0 to enable
@layer
rule support
Upcoming
- v6 migration documentation
Breaking changes in v6
- now using
stylis
v4 (if usingstylis-plugin-rtl
you'll need to upgrade to the newer version) - styled-components now provides its own types; if you installed
@types/styled-components
in the past, you'll want to remove it - dropped
$as
and$forwardedAs
props (useas
orforwardedAs
) - dropped automatic prop filtering; use transient props (
$
prefix) for stuff you don't want to be passed to child component / HTML StyleSheetManager
- replaced
disableVendorPrefixes
withenableVendorPrefixes
prop - dropped automatic vendor prefixing; if you need to support older browsers, you can re-enable it easily with the above prop
<StyleSheetManager enableVendorPrefixes> {/* your React tree and ThemeProvider goes here */} </StyleSheetManager>
- replaced
- dropped deprecated
withComponent
API (87f511a); use "as" prop instead - node >= 14 needed
Full Changelog: v6.0.0-rc.0...v6.0.0-rc.1
v6.0.0-rc.0
yarn add styled-components@beta
Changed in this version
- fix: correct dep declaration for styled-components by @PeachScript in #3995
- fix scenario where stylis failed to process some self references in CSS (6cee6c2)
Upcoming
@layer
rule support (thysultan/stylis#313)- v6 migration documentation
Breaking changes in v6
- now using
stylis
v4 (if usingstylis-plugin-rtl
you'll need to upgrade to the newer version) - styled-components now provides its own types; if you installed
@types/styled-components
in the past, you'll want to remove it - dropped
$as
and$forwardedAs
props (useas
orforwardedAs
) - dropped automatic prop filtering; use transient props (
$
prefix) for stuff you don't want to be passed to child component / HTML StyleSheetManager
- replaced
disableVendorPrefixes
withenableVendorPrefixes
prop - dropped automatic vendor prefixing; if you need to support older browsers, you can re-enable it easily with the above prop
<StyleSheetManager enableVendorPrefixes> {/* your React tree and ThemeProvider goes here */} </StyleSheetManager>
- replaced
- dropped deprecated
withComponent
API (87f511a); use "as" prop instead - node >= 14 needed
New Contributors (thank you!)
- @PeachScript made their first contribution in #3995
Full Changelog: v6.0.0-beta.15...v6.0.0-rc.0
v6.0.0-beta.15
yarn add styled-components@beta
Changed in this version
- Fixes an issue where keyframes are declared inside a namespaced StyleSheetManager by @marmite22 in #3977
- chore: remove --clipboard option in envinfo by @ImBIOS in #3972
- Fix
css
prop typings by @ahutchings in #3982 - Remove duplicated test by @ahutchings in #3984
- fix: Do not add px to CSS variables (main branch) by @Lazyuki in #3987
- several typing fixes by @probablyup in #3991
Breaking changes in v6
- now using
stylis
v4 (if usingstylis-plugin-rtl
you'll need to upgrade to the newer version) - styled-components now provides its own types; if you installed
@types/styled-components
in the past, you'll want to remove it - dropped
$as
and$forwardedAs
props (useas
orforwardedAs
) - dropped automatic prop filtering; use transient props (
$
prefix) for stuff you don't want to be passed to child component / HTML StyleSheetManager
- replaced
disableVendorPrefixes
withenableVendorPrefixes
prop - dropped automatic vendor prefixing; if you need to support older browsers, you can re-enable it easily with the above prop
<StyleSheetManager enableVendorPrefixes> {/* your React tree and ThemeProvider goes here */} </StyleSheetManager>
- replaced
- dropped deprecated
withComponent
API (87f511a); use "as" prop instead - node >= 14 needed
New Contributors (thank you!)
- @ImBIOS made their first contribution in #3972
- @ahutchings made their first contribution in #3982
Full Changelog: v6.0.0-beta.14...v6.0.0-beta.15