Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Extract rather than inline styles in Global component when in compat mode #1443

Merged

Conversation

emmatown
Copy link
Member

What:
Extract rather than inline styles in Global component when in compat mode

Why:
Closes #1424

How:

Checklist:

  • Documentation n/a
  • Tests
  • Code complete
  • Changeset

@changeset-bot
Copy link

changeset-bot bot commented Jul 24, 2019

🦋 Changeset is good to go

Latest commit: cdef1fa

We got this.

Not sure what this means? Click here to learn what changesets are.

@codecov
Copy link

codecov bot commented Jul 24, 2019

Codecov Report

Merging #1443 into master will decrease coverage by 0.04%.
The diff coverage is 100%.

Impacted Files Coverage Δ
packages/cache/src/index.js 98.9% <ø> (-1.1%) ⬇️
packages/core/src/global.js 97.67% <100%> (+0.11%) ⬆️

@luisherranz
Copy link

To understand the PR I was taking a look at what cache.compat does, and I noticed that the last line of this comment is probably not right anymore:

// in compat mode, we put the styles on the inserted cache so
// that emotion-server can pull out the styles
// except when we don't want to cache it(just the Global component right now)

@emmatown
Copy link
Member Author

emmatown commented Aug 2, 2019

Yep, that comment is wrong, updated it.

@emmatown emmatown merged commit 188dc0e into master Aug 2, 2019
@emmatown emmatown deleted the extract-rather-than-inline-styles-in-global-component branch August 2, 2019 23:05
@luisherranz
Copy link

Thanks @mitchellhamilton.

louisgv pushed a commit to louisgv/emotion that referenced this pull request Sep 6, 2020
…mode (emotion-js#1443)

* Extract rather than inline styles in Global component when in compat mode

* Add a changeset

* Update a comment
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

extractCritical doesn't extract css from <Global> components
2 participants