-
-
Notifications
You must be signed in to change notification settings - Fork 32.1k
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
[Icon] Migrate to emotion #24516
[Icon] Migrate to emotion #24516
Conversation
@material-ui/core: parsed: +0.14% , gzip: +0.17% |
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.
Only a couple of comments generally looks good :) Great progress!
Co-authored-by: Marija Najdova <mnajdova@gmail.com>
Co-authored-by: Marija Najdova <mnajdova@gmail.com>
Something is off with the This PR - https://deploy-preview-24516--material-ui.netlify.app/components/icons/#font-material-icons |
Ahh, I see what's going on -- it appears that the font size is getting overwritten by the CSS for I'm guessing the preferred option is to pseudo-class the |
Co-authored-by: Marija Najdova <mnajdova@gmail.com>
Co-authored-by: Marija Najdova <mnajdova@gmail.com>
Thanks for taking a look on it! Yes, it appears that this resource - Let's revert it to the initial implementation (without using class selectors) and add //TODO for fixing the order of the injected styles. |
This reverts commit 2a0cfb2.
Sure thing, revert complete! At first, I was thinking that it was the added |
That, plus we want to have the utility classes for the |
Looks like the last test failed due to an issue connecting to Argos CI from Circle CI. Can a peer restart the job? |
@mnajdova Interesting issue with the CSS, it looks like an issue with the configuration of the documentation. I wish emotion allowed to configure the injection point as JSS does. It will be resolve once we have migrated everything, then we can remove the |
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.
🚀
@oliviertassinari emotion has the container element https://github.com/emotion-js/emotion/blob/master/packages/cache/README.md#container which means we should be able to specify for the styles to be injected after those, but let's see if we will still need once we don't have the |
@mnajdova As far as I understand the |
Ah you are correct, I was mixing it with In our case, it would be after where the Material Design font icons are injected and before where JSS is injected: <head>
<style>Material-Design-Icons</style>
<style>Emotion</style>
<style>JSS</style> |
Hmm, even if it looks odd - you could create a div in your head and pass that div as the container to us. Could you point me to JSS docs that describe the insertion point option? How exactly would you configure it in your specific case? I'm interested in seeing what exact elements would have to exist prior to instantiating your Emotion instance etc. |
@Andarist We do the following with JSS: in the head: |
I wasn't super keen on introducing an additional option for this but when I now think amount migrating to Emotion, having different styles etc it makes sense to support something like this (and to deprecate Would your team be able to help out implementing this? This would only require adding a new option (probably normalizing it into a common option) and adjusting the |
@Andarist It seems that once we have migrated all the components to emotion, we won't need, for the docs, to have this option. Still, developers might need it, I think that we could consider contributing this back, thanks for the proposal! |
Oh ye - definitely the other one might is more important overall but also a little bit more involved. I'm open to discussing how that Global issue should be solved, I would probably handle it myself but lately, I'm just drowning in GitHub notifications and I struggle to keep up with them so I'm not sure when I will have time to sit down to it properly. |
This PR migrates the
Icon
component to emotion, with code heavily based upon #24506. Part of #24405.