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

[system] Support font prop that will pull values from theme.typography.* #23190

Closed
1 task done
mnajdova opened this issue Oct 21, 2020 · 0 comments · Fixed by #23451
Closed
1 task done

[system] Support font prop that will pull values from theme.typography.* #23190

mnajdova opened this issue Oct 21, 2020 · 0 comments · Fixed by #23451
Assignees
Labels
new feature New feature or request package: system Specific to @mui/system

Comments

@mnajdova
Copy link
Member

mnajdova commented Oct 21, 2020

  • I have searched the issues of this repository and believe that this is not a duplicate.

Summary 💡

Currently for picking up values from the theme.typogrpahy we would need to specify all font related properties separately: fontFamily, fontWeight, fontSize, letterSpacing etc.

Instead it would be much easier if developers are able to define only one property, font that will pick up all styles from theme.typography.*

Examples 🌈

<Box sx={{ font: "body1" }} />

Motivation 🔦

This API would allow us to have cleaner and much better API related to the typography. It would also solve #17504

First reported in #23053 (comment)

@mnajdova mnajdova added the status: waiting for maintainer These issues haven't been looked at yet by a maintainer label Oct 21, 2020
@mnajdova mnajdova self-assigned this Oct 21, 2020
@mnajdova mnajdova added new feature New feature or request package: system Specific to @mui/system labels Oct 21, 2020
@mnajdova mnajdova mentioned this issue Oct 21, 2020
2 tasks
@mnajdova mnajdova removed the status: waiting for maintainer These issues haven't been looked at yet by a maintainer label Oct 21, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
new feature New feature or request package: system Specific to @mui/system
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant