-
Notifications
You must be signed in to change notification settings - Fork 829
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
[Emotion] Squash :first-child/:nth-child errors #5920
Conversation
- since Jest is neither SSR or browser rendering, it really doesn't need to care about these errors
- these only appear in non-prod environments, but it's probably worth silencing them for non-SSR usage
@@ -32,6 +32,7 @@ const cache = createCache({ | |||
key: 'myApp', | |||
container: document.querySelector('meta[name="emotion-style-insert"]'), | |||
}); | |||
cache.compat = true; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@thompsongl this is used in our demo JS example - do we want consumers to copy this .compat = true
code or no? It's possible some consumers may be on SSR and actually want the warning?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We can leave this in. Even with SSR the warnings aren't helpful.
Preview documentation changes for this PR: https://eui.elastic.co/pr_5920/ |
Just realized this is hard to test without any existing usage of |
@thompsongl Any chance you can take a look at this today? #5895 needs/has it, but if #5895 lands first than this PR is kinda moot :) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, Constance!
Summary
Emotion throws a bunch of errors for the
:first-child
and:nth-child
selectors for SSR reasons: emotion-js/emotion#1105This PR silences those errors on Jest (db0b25a, see emotion-js/emotion#1105 (comment)) which absolutely do not need them, and also silences them in the browser (1378d1a, emotion-js/emotion#1105 (comment) - dev-recommended option)
Checklist
No changelog as technically this does not affect any source code