You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Add warning when component is not a styled component and cannot be referred via component selector, by @egdbear](https://github.com/egdbear) (see [#2070 (https://github.com/styled-components/styled-components/pull/2070))
Fix how ampersand is handled in self-referential selector combinations, e.g. & + & (see #2071 (https://github.com/styled-components/styled-components/pull/2071))
Add babel macro for full-featured interop with create react app v2+, by @lucleray](https://github.com/lucleray) (see [#2032 (https://github.com/styled-components/styled-components/pull/2032))
When using CRA v2, import styled components from styled-components/macro instead to gain all the benefits of our babel plugin.
Add a warning when wrapping a React component with styled() and the className isn't used (meaning styling isn't applied), by @Fer0x](https://github.com/Fer0x) (see [#2073 (https://github.com/styled-components/styled-components/pull/2073))
Add support for as to be used with attrs for better polymorphism, by @imbhargav5](https://github.com/imbhargav5) (see [#2055 (https://github.com/styled-components/styled-components/pull/2055))
Fix withTheme HOC to use a theme defined in defaultProps of the wrapped component, by @theboyWhoCriedWoolf](https://github.com/theboyWhoCriedWoolf) (see [#2033 (https://github.com/styled-components/styled-components/pull/2033))
Add enzymeFind test utility to easily grab instances of a styled-component from enyzme mounted testing scenarios, by @probablyup](https://github.com/probablyup) (see [#2049 (https://github.com/styled-components/styled-components/pull/2049))
Fix usage of keyframes with createGlobalStyle, by @probablyup](https://github.com/probablyup) (see [#2029 (https://github.com/styled-components/styled-components/pull/2029))
Inline and optimize the static hoisting functionality to avoid a bundler bug and shed a bit of package weight, by @probablyup](https://github.com/probablyup) (see [#2021 (https://github.com/styled-components/styled-components/pull/2021))
Revise createGlobalStyle HMR back to the original PR code without using componentDidMount, by @probablyup](https://github.com/probablyup) (see [#2017 (https://github.com/styled-components/styled-components/pull/2017))
Some light refactoring to further reduce object allocations, by @probablyup](https://github.com/probablyup) (see [#2016 (https://github.com/styled-components/styled-components/pull/2016))
Fix a bug introduced from some refactoring that went into beta.5 around usage of keyframes with multiple interpolations, by @probablyup](https://github.com/probablyup) (see [#2013 (https://github.com/styled-components/styled-components/pull/2013))
Tweak the styled components base component naming to look nicer in DevTools, by @probablyup](https://github.com/probablyup) (see [#2012 (https://github.com/styled-components/styled-components/pull/2012))
Beef up the error message that sometimes occurs when multiple versions of styled components are used together and the StyleSheet instance can't be found, by @probablyup](https://github.com/probablyup) (see [#2012 (https://github.com/styled-components/styled-components/pull/2012))
Fix issue with createGlobalStyle and hot module reload, by @probablyup](https://github.com/probablyup) (see [#2007 (https://github.com/styled-components/styled-components/pull/2007))
Remove keyframes factory function, by @probablyup](https://github.com/probablyup) (see [#2006 (https://github.com/styled-components/styled-components/pull/2006))
Fix an issue when streaming with very large amounts of output where sometimes styles might not make it to the client, by @probablyup](https://github.com/probablyup) (see [#1996 (https://github.com/styled-components/styled-components/pull/1996))
Fix the createGlobalStyle multiusage warning having false positives, by @probablyup](https://github.com/probablyup) (see [#1993 (https://github.com/styled-components/styled-components/pull/1993))
Expose ThemeConsumer component, the "consumer" render prop component from the React.createContext API if people are interested in using it rather than / in addition to the withTheme HOC, @probablyup
Remove "no tags" experiment, by @probablyup](https://github.com/probablyup) (see [#1987 (https://github.com/styled-components/styled-components/pull/1987)); if you are using the babel plugin, please make sure it's fully updated
Fixed an issue with createGlobalStyle when the component was composed in multiple places and render of the subsequent component instance happened before unmount of the original; previously we removed styles immediately upon unmount of any instance without checking how many copies were still alive, by @probablyup](https://github.com/probablyup) (see [#1989 (https://github.com/styled-components/styled-components/pull/1989))
Fixed an issue where createGlobalStyle was clobbering the very next style to be applied during rehydration in production mode, by @probablyup](https://github.com/probablyup) (see [#1976 (https://github.com/styled-components/styled-components/pull/1976))
Removed some unused code, by @probablyup](https://github.com/probablyup) (see [#1976 (https://github.com/styled-components/styled-components/pull/1976))
Switched createGlobalStyle to be a PureComponent, by @probablyup](https://github.com/probablyup) (see [#1976 (https://github.com/styled-components/styled-components/pull/1976))
There's a ton of new and exciting things in v4, along with breaking changes. See the full list below:
Remove deprecated consolidateStreamedStyles API, by @probablyup](https://github.com/probablyup) (see [#1906 (https://github.com/styled-components/styled-components/pull/1906))
Remove deprecated jsnext:main entry point from package.json, by @probablyup](https://github.com/probablyup) (see [#1907 (https://github.com/styled-components/styled-components/pull/1907))
Remove deprecated .extend API, by @probablyup](https://github.com/probablyup) (see [#1908 (https://github.com/styled-components/styled-components/pull/1908))
Migrate to new context API, by @alexandernanberg](https://github.com/alexandernanberg) (see [#1894 (https://github.com/styled-components/styled-components/pull/1894))
Remove TS typings; they are now to be found in DefinitelyTyped, by @probablyup. See https://github.com/styled-components/styled-components/issues/1778 for more information.
Add new data-styled-version attribute to generated <style> tags to allow multiple versions of styled-components to function on the page at once without clobbering each other, by @probablyup
It's still highly recommended to use aliasing via your bundler to dedupe libraries like styled-components and react.
Breaking change] Refactor keyframes helper, by @fer0x (see [#1930 (https://github.com/styled-components/styled-components/pull/1930)).
Keyframes is now implemented in a "lazy" manner: its styles will be injected with the render phase of components using them.
keyframes no longer returns an animation name, instead it returns an object which has method .getName() for the purpose of getting the animation name.
Add createGlobalStyle that returns a component which, when mounting, will apply global styles. This is a replacement for the injectGlobal API. It can be updated, replaced, removed, etc like any normal component and the global scope will update accordingly, by @JamieDixon](https://github.com/JamieDixon) @marionebl, @yjimk, and @imbhargav5 (see [#1416 (https://github.com/styled-components/styled-components/pull/1416))
constGlobalStyles=createGlobalStyle` html { color: 'red'; }`// then put it in your React tree somewhere:// <GlobalStyles />
Migrate to use new React.forwardRef API, by @probablyup; note that this removes the innerRef API since it is no longer needed.
Implement styled() wrapper folding. In a nutshell, when you nest styled wrappers (e.g. styled(styled.div)) the components are now folded such that only one is mounted that contains the merged styles of its ancestors. This is conceptually equivalent to the removed "extend" functionality, but without many of the downsides -- and it's automatic, by @probablyup](https://github.com/probablyup) (see [#1962 (https://github.com/styled-components/styled-components/pull/1962))
Added a first-class API for rendering polymorphism via "as" prop. In most cases, this new prop will replace your need to use the .withComponent API. It allows you to control what underlying element or component is rendered at runtime, while not messing with the styles, by @probablyup](https://github.com/probablyup) (see [#1962 (https://github.com/styled-components/styled-components/pull/1962))
A note for preact users: if you are doing the preact-compat aliasing, it won't work with this beta because they haven't implemented React.createContext in preact-compat yet (https://github.com/developit/preact-compat/issues/475).
doppins-bot
changed the title
[Doppins] Upgrade dependency styled-components to ^4.0.0
[Doppins] Upgrade dependency styled-components to ^4.0.1
Oct 17, 2018
doppins-bot
changed the title
[Doppins] Upgrade dependency styled-components to ^4.0.1
[Doppins] Upgrade dependency styled-components to ^4.0.2
Oct 18, 2018
doppins-bot
changed the title
[Doppins] Upgrade dependency styled-components to ^4.0.2
[Doppins] Upgrade dependency styled-components to ^4.0.3
Oct 30, 2018
doppins-bot
changed the title
[Doppins] Upgrade dependency styled-components to ^4.0.3
[Doppins] Upgrade dependency styled-components to ^4.1.0
Nov 12, 2018
doppins-bot
changed the title
[Doppins] Upgrade dependency styled-components to ^4.1.0
[Doppins] Upgrade dependency styled-components to ^4.1.1
Nov 12, 2018
doppins-bot
changed the title
[Doppins] Upgrade dependency styled-components to ^4.1.1
[Doppins] Upgrade dependency styled-components to ^4.1.2
Nov 28, 2018
doppins-bot
changed the title
[Doppins] Upgrade dependency styled-components to ^4.1.2
[Doppins] Upgrade dependency styled-components to ^4.1.3
Dec 17, 2018
doppins-bot
changed the title
[Doppins] Upgrade dependency styled-components to ^4.1.3
[Doppins] Upgrade dependency styled-components to ^4.2.0
Mar 23, 2019
doppins-bot
changed the title
[Doppins] Upgrade dependency styled-components to ^4.2.0
[Doppins] Upgrade dependency styled-components to ^4.2.1
Jun 3, 2019
doppins-bot
changed the title
[Doppins] Upgrade dependency styled-components to ^4.2.1
[Doppins] Upgrade dependency styled-components to ^4.3.0
Jun 5, 2019
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Hi!
A new version was just released of
styled-components, so Doppinshas upgraded your project's dependency ranges.
Make sure that it doesn't break anything, and happy merging!
Upgraded styled-components from
^3.2.5to^4.0.0Changelog:
Version 4.0.0
Blog post ・ Migration instructions
Add warning when component is not a styled component and cannot be referred via component selector, by
@egdbear](https://github.com/egdbear) (see [#2070(https://github.com/styled-components/styled-components/pull/2070))Fix how ampersand is handled in self-referential selector combinations, e.g.
& + &(see#2071(https://github.com/styled-components/styled-components/pull/2071))Add babel macro for full-featured interop with create react app v2+, by
@lucleray](https://github.com/lucleray) (see [#2032(https://github.com/styled-components/styled-components/pull/2032))When using CRA v2, import styled components from
styled-components/macroinstead to gain all the benefits of our babel plugin.Add a warning when wrapping a React component with
styled()and theclassNameisn't used (meaning styling isn't applied), by@Fer0x](https://github.com/Fer0x) (see [#2073(https://github.com/styled-components/styled-components/pull/2073))Version 4.0.0
Blog post ・ Migration instructions
Add support for
asto be used withattrsfor better polymorphism, by@imbhargav5](https://github.com/imbhargav5) (see [#2055(https://github.com/styled-components/styled-components/pull/2055))Fix
withThemeHOC to use a theme defined indefaultPropsof the wrapped component, by@theboyWhoCriedWoolf](https://github.com/theboyWhoCriedWoolf) (see [#2033(https://github.com/styled-components/styled-components/pull/2033))Add
enzymeFindtest utility to easily grab instances of a styled-component from enyzme mounted testing scenarios, by@probablyup](https://github.com/probablyup) (see [#2049(https://github.com/styled-components/styled-components/pull/2049))Version 4.0.0
Blog post ・ Migration instructions
keyframeswithcreateGlobalStyle, by@probablyup](https://github.com/probablyup) (see [#2029(https://github.com/styled-components/styled-components/pull/2029))Version 4.0.0
Blog post ・ Migration instructions
@probablyup](https://github.com/probablyup) (see [#2021(https://github.com/styled-components/styled-components/pull/2021))Version 4.0.0
Blog post ・ Migration instructions
Revise createGlobalStyle HMR back to the original PR code without using
componentDidMount, by@probablyup](https://github.com/probablyup) (see [#2017(https://github.com/styled-components/styled-components/pull/2017))Some light refactoring to further reduce object allocations, by
@probablyup](https://github.com/probablyup) (see [#2016(https://github.com/styled-components/styled-components/pull/2016))Version 4.0.0
Blog post ・ Migration instructions
Fix a bug introduced from some refactoring that went into beta.5 around usage of
keyframeswith multiple interpolations, by@probablyup](https://github.com/probablyup) (see [#2013(https://github.com/styled-components/styled-components/pull/2013))Tweak the styled components base component naming to look nicer in DevTools, by
@probablyup](https://github.com/probablyup) (see [#2012(https://github.com/styled-components/styled-components/pull/2012))Beef up the error message that sometimes occurs when multiple versions of styled components are used together and the StyleSheet instance can't be found, by
@probablyup](https://github.com/probablyup) (see [#2012(https://github.com/styled-components/styled-components/pull/2012))Version 4.0.0
Blog post ・ Migration instructions
Fix issue with
createGlobalStyleand hot module reload, by@probablyup](https://github.com/probablyup) (see [#2007(https://github.com/styled-components/styled-components/pull/2007))Remove keyframes factory function, by
@probablyup](https://github.com/probablyup) (see [#2006(https://github.com/styled-components/styled-components/pull/2006))Version 4.0.0
Blog post ・ Migration instructions
Note: this beta has a lot of internal changes. If you notice anything funky, please let us know. All tests are passing, etc.
Use PureComponent instead of Component for the StyledComponent base class, by
@probablyupInternal refactoring to simplify the codebase and make it more readily DCE-able, by
@probablyupVersion 4.0.0
Blog post ・ Migration instructions
Fix an issue when streaming with very large amounts of output where sometimes styles might not make it to the client, by
@probablyup](https://github.com/probablyup) (see [#1996(https://github.com/styled-components/styled-components/pull/1996))Fix the
createGlobalStylemultiusage warning having false positives, by@probablyup](https://github.com/probablyup) (see [#1993(https://github.com/styled-components/styled-components/pull/1993))Version 4.0.0
Blog post ・ Migration instructions
Expose
ThemeConsumercomponent, the "consumer" render prop component from theReact.createContextAPI if people are interested in using it rather than / in addition to thewithThemeHOC,@probablyupRemove "no tags" experiment, by
@probablyup](https://github.com/probablyup) (see [#1987(https://github.com/styled-components/styled-components/pull/1987)); if you are using the babel plugin, please make sure it's fully updatedFixed an issue with
createGlobalStylewhen the component was composed in multiple places and render of the subsequent component instance happened before unmount of the original; previously we removed styles immediately upon unmount of any instance without checking how many copies were still alive, by@probablyup](https://github.com/probablyup) (see [#1989(https://github.com/styled-components/styled-components/pull/1989))Version 4.0.0
Blog post ・ Migration instructions
Fixed an issue where
createGlobalStylewas clobbering the very next style to be applied during rehydration in production mode, by@probablyup](https://github.com/probablyup) (see [#1976(https://github.com/styled-components/styled-components/pull/1976))Removed some unused code, by
@probablyup](https://github.com/probablyup) (see [#1976(https://github.com/styled-components/styled-components/pull/1976))Switched
createGlobalStyleto be aPureComponent, by@probablyup](https://github.com/probablyup) (see [#1976(https://github.com/styled-components/styled-components/pull/1976))Version 4.0.0
The first beta of v4 is here! 👏🥂
Blog post ・ Migration instructions
There's a ton of new and exciting things in v4, along with breaking changes. See the full list below:
Remove deprecated
consolidateStreamedStylesAPI, by@probablyup](https://github.com/probablyup) (see [#1906(https://github.com/styled-components/styled-components/pull/1906))Remove deprecated
jsnext:mainentry point from package.json, by@probablyup](https://github.com/probablyup) (see [#1907(https://github.com/styled-components/styled-components/pull/1907))Remove deprecated
.extendAPI, by@probablyup](https://github.com/probablyup) (see [#1908(https://github.com/styled-components/styled-components/pull/1908))Migrate to new context API, by
@alexandernanberg](https://github.com/alexandernanberg) (see [#1894(https://github.com/styled-components/styled-components/pull/1894))Remove TS typings; they are now to be found in DefinitelyTyped, by
@probablyup. Seehttps://github.com/styled-components/styled-components/issues/1778for more information.Add new
data-styled-versionattribute to generated<style>tags to allow multiple versions of styled-components to function on the page at once without clobbering each other, by@probablyupIt's still highly recommended to use aliasing via your bundler to dedupe libraries like styled-components and react.
Breaking change] Refactor
keyframeshelper, by@fer0x(see [#1930(https://github.com/styled-components/styled-components/pull/1930)).Keyframes is now implemented in a "lazy" manner: its styles will be injected with the render phase of components using them.
keyframesno longer returns an animation name, instead it returns an object which has method.getName()for the purpose of getting the animation name.Add
createGlobalStylethat returns a component which, when mounting, will apply global styles. This is a replacement for theinjectGlobalAPI. It can be updated, replaced, removed, etc like any normal component and the global scope will update accordingly, by@JamieDixon](https://github.com/JamieDixon)@marionebl,@yjimk, and@imbhargav5(see [#1416(https://github.com/styled-components/styled-components/pull/1416))Migrate to use new
React.forwardRefAPI, by@probablyup; note that this removes theinnerRefAPI since it is no longer needed.Implement
styled()wrapper folding. In a nutshell, when you nest styled wrappers (e.g.styled(styled.div)) the components are now folded such that only one is mounted that contains the merged styles of its ancestors. This is conceptually equivalent to the removed "extend" functionality, but without many of the downsides -- and it's automatic, by@probablyup](https://github.com/probablyup) (see [#1962(https://github.com/styled-components/styled-components/pull/1962))Added a first-class API for rendering polymorphism via "as" prop. In most cases, this new prop will replace your need to use the
.withComponentAPI. It allows you to control what underlying element or component is rendered at runtime, while not messing with the styles, by@probablyup](https://github.com/probablyup) (see [#1962(https://github.com/styled-components/styled-components/pull/1962))A note for
preactusers: if you are doing thepreact-compataliasing, it won't work with this beta because they haven't implementedReact.createContextinpreact-compatyet (https://github.com/developit/preact-compat/issues/475).