Skip to content

Latest commit

 

History

History
29 lines (24 loc) · 624 Bytes

sixty-balloons-build.md

File metadata and controls

29 lines (24 loc) · 624 Bytes
@emotion/cache @emotion/sheet
minor
minor

Add insertionPoint option to the EmotionCache, to insert rules after the specified element.

const head = document.querySelector('head')

const firstStyle = document.createElement('style')
const lastStyle = document.createElement('style')
head.appendChild(firstStyle)
head.appendChild(lastStyle)

// the emotion sheets should be inserted between the first and last style nodes
const cache = createCache({
  key: 'my-app',
  insertionPoint: firstStyle
})

function App() {
  return (
    <CacheProvider value={cache}>
      <Main />
    </CacheProvider>
  )
}