👩🎤 CSS-in-JS library designed for high performance style composition
MIT License
Bot releases are visible (Hide)
Published by github-actions[bot] almost 5 years ago
4a891bf6
#1473 Thanks @jcharry! - Accept new prepend
option to allow for adding style tags at the beginning of the specified DOM container.4a891bf6
]:
Published by github-actions[bot] almost 5 years ago
4a891bf6
]:
Published by github-actions[bot] almost 5 years ago
Published by github-actions[bot] almost 5 years ago
843bfb11
#1600 Thanks @Andarist! - Removed @emotion/css
- it's main purpose was to allow css
to be a Babel macro, but since babel-plugin-macros allows us to keep imports nowadays this is no longer needed. @emotion/core/macro
has been added to account for this use case and appropriate changes has been made to babel-plugin-emotion
to facilitate those changes.
If you have used @emotion/css
directly (it was always reexported from @emotion/core
) or you have been using its macro then you should update your code like this:
-import css from '@emotion/css'
+import { css } from '@emotion/core'
// or
-import css from '@emotion/css/macro'
+import { css } from '@emotion/core/macro'
Published by github-actions[bot] almost 5 years ago
843bfb11
#1600 Thanks @Andarist! - @emotion/native
& @emotion/primitives
packages come with macros now. Both can be used as @emotion/native/macro
& @emotion/primitives/macro
respectively.
f1b7c9d6
#1600 Thanks @Andarist! - Added basic support for accepting custom shouldForwardProp
option.
Published by github-actions[bot] almost 5 years ago
923ded01
#1600 Thanks @JakeGinnivan! - Relaxed types for shouldForwardProp
as it needs to be able to filter props for a generic argument of the resulting function.923ded01
, 0a4a22ff
, 828111cd
, 843bfb11
, 828111cd
, cbb8b796
]:
Published by github-actions[bot] almost 5 years ago
Published by github-actions[bot] almost 5 years ago
843bfb11
#1600 Thanks @Andarist! - Removed @emotion/css
- it's main purpose was to allow css
to be a Babel macro, but since babel-plugin-macros allows us to keep imports nowadays this is no longer needed. @emotion/core/macro
has been added to account for this use case and appropriate changes has been made to babel-plugin-emotion
to facilitate those changes.
If you have used @emotion/css
directly (it was always reexported from @emotion/core
) or you have been using its macro then you should update your code like this:
-import css from '@emotion/css'
+import { css } from '@emotion/core'
// or
-import css from '@emotion/css/macro'
+import { css } from '@emotion/core/macro'
Published by github-actions[bot] almost 5 years ago
843bfb11
#1600 Thanks @Andarist! - @emotion/native
& @emotion/primitives
packages come with macros now. Both can be used as @emotion/native/macro
& @emotion/primitives/macro
respectively.
f1b7c9d6
#1600 Thanks @Andarist! - Added basic support for accepting custom shouldForwardProp
option.
923ded01
, 0a4a22ff
, 843bfb11
, 828111cd
]:
Published by github-actions[bot] almost 5 years ago
923ded01
#1600 Thanks @JakeGinnivan! - Allow isPropValid
to take any PropertyKey
as an argument (instead of just string
).Published by github-actions[bot] almost 5 years ago
828111cd
, 843bfb11
, cbb8b796
]:
Published by github-actions[bot] almost 5 years ago
843bfb11
#1600 Thanks @Andarist! - Removed @emotion/css
- it's main purpose was to allow css
to be a Babel macro, but since babel-plugin-macros allows us to keep imports nowadays this is no longer needed. @emotion/core/macro
has been added to account for this use case and appropriate changes has been made to babel-plugin-emotion
to facilitate those changes.
If you have used @emotion/css
directly (it was always reexported from @emotion/core
) or you have been using its macro then you should update your code like this:
-import css from '@emotion/css'
+import { css } from '@emotion/core'
// or
-import css from '@emotion/css/macro'
+import { css } from '@emotion/core/macro'
cbb8b796
#1600 Thanks @Andarist! - emotion-theming
has been removed and all its exports were moved to @emotion/core
package. Please import them like this import { useTheme, ThemeProvider, withTheme } from '@emotion/core'
from now on.
828111cd
#1600 Thanks @Andarist! - Global
imported from macro entry (@emotion/core/macro
) gets source maps generated now when inline css-less expression is used as value of the styles
prop.923ded01
, 4a891bf6
, 843bfb11
]:
Published by github-actions[bot] almost 5 years ago
Published by github-actions[bot] almost 5 years ago
ad77ed24
#1600 Thanks @JakeGinnivan! - Added CreateStyled
overload to handle when shouldForwardProp
is a custom type guard for intrinsic props.
As an example, if you want to override the type of the color
prop:
export const Box = styled('div', {
shouldForwardProp: (
propName
): propName is Exclude<keyof JSX.IntrinsicElements['div'], 'color'> =>
propName !== 'color'
})<{ color: Array<string> }>(props => ({
color: props.color[0]
}))
;<Box color={['green']} />
99c6b7e2
#1600 Thanks @JakeGinnivan! - Fix issue with one of TypeScript overloads for styled
. It pass StyleProps
to Interpolation
correctly now.Published by github-actions[bot] almost 5 years ago
ad77ed24
, 99c6b7e2
]:
Published by github-actions[bot] almost 5 years ago
Published by github-actions[bot] almost 5 years ago
Published by github-actions[bot] almost 5 years ago
ad77ed24
, 99c6b7e2
]:
Published by github-actions[bot] almost 5 years ago
Published by github-actions[bot] almost 5 years ago
e6e079c3
]: