-
Notifications
You must be signed in to change notification settings - Fork 12
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
Styles: Migration to Emotion v11 #112
Comments
Chatted with @saramarcondes briefly on this. I think we'll hold on the upgrade for now, since Gutenberg is currently on Emotion v10. Will keep this issue open, but removing from the "Prep" milestone |
Bumping this! Emotion 11 was something @saramarcondes had mentioned recently during the G2 -> Gutenberg integration process. I'll be looking into this to see how we can elegantly migrate to Emotion V11 in the |
It looks like |
Update! Looks like swapping The only hiccup is Stylis. Stylis V4 is very different (mentioned in the original issue). We can perhaps look to this as an example: |
Looks like Emotion v11 came out!
🆙 Upgrades
I haven't tried the v11 yet. Based on the post, it looks like there are a couple of things we need to adjust in
create-styles
to make it compatible with v11.Stylis
I'm aware that Stylis v4 is substantially different than v3 (which was what powered Emotion and Styled Components). I haven't had any experience with Stylis v4 yet.
We'll had to rewrite the current plugins in
create-styles
to work with the new Stylis v4 middleware layer (previously referred to as "plugins").Emotion Cache
This one isn't a huge deal. We may have to change the prefix to something else, perhaps
wp-css
or something. If we do, we'll have to update all of our screenshots, and perhaps some of thecreate-styles
code that may be looking for.css-
specifically.There's probably more to all of this. My sense is this won't be too bad. I expect all of the upgrades to happen within
create-styles
. A lot of the code there is modularized, which may make it easier to target and tweak things.❓Should we upgrade?
There's also the question of whether we should or not. At the moment, Gutenberg is using Emotion v10.
Multiple emotion instances should not be a problem. For example, G2 Components can be used within Gutenberg without any conflicts (dedicated style system and all).
I'm not sure about Emotion V11 (if G2 Components upgrades) + Emotion V10 (Gutenberg).
I'm guessing it should be okay?
Would love some thoughts on this :)
cc'ing @saramarcondes
The text was updated successfully, but these errors were encountered: