-
-
Notifications
You must be signed in to change notification settings - Fork 32.5k
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] fontSize prop not applied to Icon component #25829
Comments
@jonomatusky Thanks for opening an issue so we can have a focused discussion on this problem. We have been aware of this problem for a while. On the surface, it's a problem specific to the documentation. It works once you open the demo in codesandbox: https://codesandbox.io/s/b8ve3?file=/index.tsx. At the root cause, it's an issue with emotion that doesn't provide the option to determine the exact injection location of the styles in the |
As far as I remember this is an issue during the transition period, where JSS is currently applied after emotion so that the overrides would work. I think emotion should always be added after the icons's styles is loaded, isn't that right? |
@mnajdova Correct. Based on the amount of JSS we have in the documentation, it might take a while before we can fix the docs (what I called the surface issue as opposed to the root). |
I can't seem to find the discussion, I remember that the initial implementation of |
This is not relevant but related:
The failure is now observable on v5.0.0-alpha.34:
I confused the two providers:
|
@luminaxster thanks for the feedback. It was a mistake at the start that we went with the same name
Good catch! Seems like the PR description contain the BC description, but the changelog not.
|
Current Behavior 😯
The fontSize prop does not affect the component. Using sx doesn't affect size either. Tested in Chrome 89.0 and Safari 14.0.
See example in the new docs. The fontSize prop doesn't impact the size of the icons:
https://next.material-ui.com/components/icons/#font-material-icons
Expected Behavior 🤔
Expect same behavior as in v4, displayed in the current docs:
https://next.material-ui.com/components/icons/#font-material-icons
Your Environment 🌎
`npx @material-ui/envinfo`
System: OS: macOS 10.15.7 Binaries: Node: 14.15.0 - ~/.nvm/versions/node/v14.15.0/bin/node Yarn: Not Found npm: 7.6.0 - ~/Software/plynth/Current/plynth/plynth-frontend/node_modules/.bin/npm Browsers: Chrome: 89.0.4389.128 Edge: Not Found Firefox: 81.0.1 Safari: 14.0.3 npmPackages: @emotion/react: ^11.1.5 => 11.1.5 @emotion/styled: ^11.1.5 => 11.1.5 @material-ui/core: ^5.0.0-alpha.27 => 5.0.0-alpha.27 @material-ui/icons: ^5.0.0-alpha.28 => 5.0.0-alpha.28 @material-ui/lab: ^5.0.0-alpha.27 => 5.0.0-alpha.27 @material-ui/styled-engine: 5.0.0-alpha.25 @material-ui/styles: 5.0.0-alpha.27 @material-ui/system: 5.0.0-alpha.27 @material-ui/types: 5.1.7 @material-ui/unstyled: 5.0.0-alpha.27 @material-ui/utils: 5.0.0-alpha.27 @types/react: 17.0.2 react: ^17.0.2 => 17.0.2 react-dom: ^17.0.1 => 17.0.1The text was updated successfully, but these errors were encountered: