- #2920
61c66963
Thanks @pvdstel! - Do not log failed rule insertions in the speedy mode for even more vendor-prefixed pseudo-elements/classes like:-ms-expand
and:-ms-reveal
.
- #2819
bbad8c79
Thanks @nicksrandall! -exports
field has been added to thepackage.json
manifest. It limits what files can be imported from a package but we've tried our best to allow importing all the files that were considered to be a part of the public API.
- #2728
6c2d7a60
Thanks @Peeja! - TypeScript type for thecontainer
option has been adjusted. It will now accept aShadowRoot
, or any other kind ofNode
.
- #2521
516fe45
Thanks @mnajdova! - AddedinsertionPoint
option to theSheet
's constructor. It can be used to insert rules after the specified element.
- #2447
f2eda829
Thanks @mdesantis! - Fixed an issue withsheet.flush()
crashing if its style elements were already detached by something else.
- #2393
405af5ca
Thanks @layershifter! - Do not log failed rule insertions in the speedy mode for even more vendor-prefixed pseudo-elements/classes like:-moz-focus-inner
,:-moz-focusring
, and:-ms-clear
.
5469d003
#2149 Thanks @Andarist! - Do not log failed rule insertions in the speedy mode for vendor-prefixed pseudo-elements/classes like::-moz-placeholder
.
9e998e37
#1817 Thanks @Andarist! -@import
rules are no longer special-cased - they no longer are always inserted at the beginning of the stylesheet. The responsibility to put them first has been moved to a consumer of this package.
4a891bf6
#1473 Thanks @jcharry! - The newprepend
option can make Emotion add style tags at the beginning of the specified DOM container instead of the end.
dfe79aca
#1696 Thanks @Andarist! - Addedhydrate
method which can be used for SSRed styles. They become a part of a sheet and can be flushed.
42df3f3b
#2028 Thanks @Andarist! - Generated style elements gotdata-s="1"
attribute so@emotion/cache
can recognize them as being already owned by another Emotion copy to avoid messing up existing style elements when initializing a new copy.
1e4a741d
#1697 Thanks @Andarist! - Removed mentions ofmaxLength
option in types & docs as it has been removed some time ago.
42df3f3b
#2028 Thanks @Andarist! - Generated style elements gotdata-s
attribute so@emotion/cache
can recognize them as being already owned by another Emotion copy to avoid messing up existing style elements when initializing a new copy.
39be057b
#1997 Thanks @Andarist! - Reverted the change that has started to add an empty<style/>
element eagerly in non-production environments that has been introduced inv1.0.0-next.3
as this has found to be problematic for websites usingContent-Security-Policy
and anonce
. Instead of this@emotion/cache
will from now on insert an empty rule in non-production environments but it will only do that if an empty rule gets actually created by the user.
-
dc1a0c5e
#1962 Thanks @Andarist! - From now on an empty<style/>
element gets inserted eagerly into the DOM in the constructor in non-production environments. This helps to grab usedkey
s from the (JS)DOM even for sheets/caches that have not inserted any actual rules to the document yet. It allows@emotion/jest
to find those and serialize Emotion classes properly in situations like this:import styled from '@emotion/styled/macro' import { render } from '@testing-library/react' const Div = styled.div`` test('foo', () => { const { container } = render(<Div />) expect(container).toMatchSnapshot() })
9e998e37
#1817 Thanks @Andarist! -@import
rules are no longer special-cased - they no longer are always inserted at the beginning of the stylesheet. The responsibility to put them first has been moved to a consumer of this package.
91046a8c
#1900 Thanks @Andarist! - Renamedrehydrate
method tohydrate
to align naming to what is already used in Emotion and React itself.
dfe79aca
#1572 Thanks @Andarist! - Addedrehydrate
method which can be used for SSRed styles. They become a part of a sheet and can be flushed.
1e4a741d
#1572 Thanks @Andarist! - Removed mentions ofmaxLength
option in types & docs as it has been removed some time ago.
4a891bf6
#1473 Thanks @jcharry! - Accept newprepend
option to allow for adding style tags at the beginning of the specified DOM container.
- c0eb604d #1419 Thanks @mitchellhamilton! - Update build tool