Skip to content
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

v5.11.13 broke typography sx handling #36542

Closed
2 tasks done
genepaul opened this issue Mar 16, 2023 · 1 comment · Fixed by #36543
Closed
2 tasks done

v5.11.13 broke typography sx handling #36542

genepaul opened this issue Mar 16, 2023 · 1 comment · Fixed by #36543
Assignees
Labels
package: system Specific to @mui/system regression A bug, but worse

Comments

@genepaul
Copy link

Duplicates

  • I have searched the existing issues

Latest version

  • I have tested the latest version

Steps to reproduce 🕹

Link to live example: https://codesandbox.io/s/vibrant-brook-572rnc?file=/src/App.js

Steps:

  1. Notice that the font weight on the code sandbox is not being changed
  2. Downgrade @mui/material in the codesandbox to v5.11.12 or earlier and notice that the font weight gets appropriately changed.

I believe #33621 is what broke this functionality

Current behavior 😯

The documentation says you can do something like this for any sx prop:

sx={{
    fontWeight: 'fontWeightMedium'
}}

But it appears now that it only works without the prefix:

sx={{
   fontWeight: 'medium'
}}

Here's the documentation that refers to being able to use fontWeightLight (as an example):

https://mui.com/system/getting-started/the-sx-prop/#typography

Expected behavior 🤔

According to the documentation, we should still be able to use fontWeightLight or similar.

Context 🔦

No response

Your environment 🌎

npx @mui/envinfo

  System:
    OS: macOS 12.6.3
  Binaries:
    Node: 18.14.2 - ~/.nvm/versions/node/v18.14.2/bin/node
    Yarn: Not Found
    npm: 8.19.4 - ~/Developer/component-library/node_modules/.bin/npm
  Browsers:
    Chrome: 111.0.5563.64
    Edge: Not Found
    Firefox: 107.0.1
    Safari: 15.6.1
  npmPackages:
    @emotion/react: ^11.7.1 => 11.10.6 
    @emotion/styled: ^11.6.0 => 11.10.6 
    @mui/base:  5.0.0-alpha.121 
    @mui/core-downloads-tracker:  5.11.13 
    @mui/icons-material: 5.11.11 => 5.11.11 
    @mui/lab: ^5.0.0-alpha.67 => 5.0.0-alpha.123 
    @mui/material: ^5.7.0 => 5.11.13 
    @mui/private-theming:  5.11.13 
    @mui/styled-engine:  5.11.11 
    @mui/system: ^5.7.0 => 5.11.13 
    @mui/types:  7.2.3 
    @mui/utils:  5.11.13 
    @types/react:  18.0.28 
    react: 17.0.2 => 17.0.2 
    react-dom: 17.0.2 => 17.0.2 
    typescript: 4.9.5 => 4.9.5 
@mnajdova
Copy link
Member

PR #36543 created, thanks for raising this up

@mnajdova mnajdova assigned mnajdova and unassigned siriwatknp Mar 17, 2023
@mnajdova mnajdova added package: system Specific to @mui/system regression A bug, but worse and removed component: Typography The React component. status: waiting for maintainer These issues haven't been looked at yet by a maintainer labels Mar 17, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
package: system Specific to @mui/system regression A bug, but worse
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants