Skip to content

Releases: styled-components/styled-components

v6.0.1

28 Jun 13:12
Compare
Choose a tag to compare

Fixed an issue where a dev-time warning was being triggered too eagerly.

Full Changelog: v6.0.0...v6.0.1

v6.0.0

28 Jun 01:02
Compare
Choose a tag to compare
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 using stylis-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 (use as or forwardedAs)
  • dropped automatic prop filtering; use transient props ($ prefix) for stuff you don't want to be passed to child component / HTML
  • StyleSheetManager
    • replaced disableVendorPrefixes with enableVendorPrefixes 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>
  • 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

23 Jun 19:01
Compare
Choose a tag to compare
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 using stylis-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 (use as or forwardedAs)
  • dropped automatic prop filtering; use transient props ($ prefix) for stuff you don't want to be passed to child component / HTML
  • StyleSheetManager
    • replaced disableVendorPrefixes with enableVendorPrefixes 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>
  • 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

22 Jun 04:45
Compare
Choose a tag to compare
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 using stylis-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 (use as or forwardedAs)
  • dropped automatic prop filtering; use transient props ($ prefix) for stuff you don't want to be passed to child component / HTML
  • StyleSheetManager
    • replaced disableVendorPrefixes with enableVendorPrefixes 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>
  • 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

04 Jun 02:57
57f15c4
Compare
Choose a tag to compare

Full Changelog: v6.0.0-rc.2...v6.0.0-rc.3

v5.3.11

26 May 03:42
4f54d97
Compare
Choose a tag to compare

Removed use of the useDebugValue hook to rectify older React support.

Full Changelog: v5.3.10...v5.3.11

v6.0.0-rc.2

24 May 00:44
f37e02e
Compare
Choose a tag to compare
yarn add styled-components

Changed in this version

New Contributors

Upcoming

  • v6 migration documentation

Breaking changes in v6

  • now using stylis v4 (if using stylis-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 (use as or forwardedAs)
  • dropped automatic prop filtering; use transient props ($ prefix) for stuff you don't want to be passed to child component / HTML
  • StyleSheetManager
    • replaced disableVendorPrefixes with enableVendorPrefixes 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>
  • 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

06 May 21:50
Compare
Choose a tag to compare
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 using stylis-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 (use as or forwardedAs)
  • dropped automatic prop filtering; use transient props ($ prefix) for stuff you don't want to be passed to child component / HTML
  • StyleSheetManager
    • replaced disableVendorPrefixes with enableVendorPrefixes 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>
  • 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

04 May 02:29
Compare
Choose a tag to compare
v6.0.0-rc.0 Pre-release
Pre-release
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

Breaking changes in v6

  • now using stylis v4 (if using stylis-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 (use as or forwardedAs)
  • dropped automatic prop filtering; use transient props ($ prefix) for stuff you don't want to be passed to child component / HTML
  • StyleSheetManager
    • replaced disableVendorPrefixes with enableVendorPrefixes 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>
  • dropped deprecated withComponent API (87f511a); use "as" prop instead
  • node >= 14 needed

New Contributors (thank you!)

Full Changelog: v6.0.0-beta.15...v6.0.0-rc.0

v6.0.0-beta.15

23 Apr 00:34
Compare
Choose a tag to compare
v6.0.0-beta.15 Pre-release
Pre-release
yarn add styled-components@beta

Changed in this version

Breaking changes in v6

  • now using stylis v4 (if using stylis-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 (use as or forwardedAs)
  • dropped automatic prop filtering; use transient props ($ prefix) for stuff you don't want to be passed to child component / HTML
  • StyleSheetManager
    • replaced disableVendorPrefixes with enableVendorPrefixes 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>
  • dropped deprecated withComponent API (87f511a); use "as" prop instead
  • node >= 14 needed

New Contributors (thank you!)

Full Changelog: v6.0.0-beta.14...v6.0.0-beta.15