Skip to content

[Icon] fontSize prop not applied to Icon component #25829

@jonomatusky

Description

@jonomatusky
  • The issue is present in the latest release.
  • I have searched the issues of this repository and believe that this is not a duplicate.

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:

Screen Shot 2021-04-18 at 8 21 29 AM

https://next.material-ui.com/components/icons/#font-material-icons

Expected Behavior 🤔

Expect same behavior as in v4, displayed in the current docs:

Screen Shot 2021-04-18 at 8 22 26 AM

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.1

Metadata

Metadata

Assignees

No one assigned

    Labels

    component: IconThe React component.docsImprovements or additions to the documentation.package: styled-engineSpecific to @mui/styled-enginescope: systemThe system, the design tokens / styling foundations used across components. eg. @mui/system with MUI

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions