github emotion-js/emotion @emotion/cache@11.0.0-next.16

latest releases: @emotion/styled@11.11.5, @emotion/serialize@1.1.4, @emotion/is-prop-valid@1.2.2...
pre-release3 years ago

Patch Changes

  • a8eb4e75 #1998 Thanks @Andarist! - Styles are now correctly extracted from the correct cache (key-sensitive) on the server.

  • dfe98028 #2003 Thanks @Andarist! - Fixed an issue with orphaned pseudo selectors (e.g. :hover - where &:hover, div:hover, etc are not considered orphaned) having the context selector (the one computed based on all ancestor levels selectors) doubled in a descendant at-rule.

  • 39be057b #1997 Thanks @Andarist! - From now on an empty rule will get inserted into the DOM in non-production environments if it gets created by the user. This helps to grab used keys from the (JS)DOM even for 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()
    })
  • Updated dependencies [debaad9a, 39be057b]:

    • @emotion/utils@1.0.0-next.1
    • @emotion/sheet@1.0.0-next.4

Don't miss a new emotion release

NewReleases is sending notifications on new releases.