-
-
Notifications
You must be signed in to change notification settings - Fork 32.4k
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
[Button] Text wrap issue #38675
Comments
Hi ,can I work on this if it is open? |
Thanks for asking! The PR is already there, would you mind taking a look at other issues? |
I checked on Material UI v6, it looks ok: https://mui.com/material-ui/react-button/#material-you-version cc @DiegoAndai. I wouldn't mind -1px on padding-top and padding-bottom though: Actually, should we rename "Material You version" to something like "Material UI v6 (alpha)"? |
Is this issue still open, so that I can work on this. |
Hey,Is this issue still open, so that I can work on this. |
@Praveen03AJJARAPU @akshayw1 Thanks for asking, the Joy PR is already up. On the Material line height, we should define it before working on it.
@oliviertassinari @zanivan, what should we use for the line height? Would we change it for buttons with text wrapping only? Regarding v6 (#38675 (comment))
|
@DiegoAndai I'm not familiar with the implementation, to consider the impact on the design tokens. Maybe it's not worth it. In v5, If I recall the code correctly, this isn't a concern. At the end of the day, I think the UX should win over other considerations, like following exactly the design token structure. I mean, we should aim to make the same tradeoffs designers & engineers would want to make.
I don't think developers or the code can know if a button wraps. In most cases, it's not supposed to (this issue is about minimizing the worst case scenario when a button needs to wrap to fit in the layout). |
Hello is the issue still open can i pull and solve it ? |
Hello, I'd like to inquire if the issue is still available for me to pull and work on? |
Hey, @ShaikhHeeba07 @hetpatel4381 thanks for asking! We already have two undergoing PRs for the Joy UI line height on buttons, the #38696 and #39316 :) |
Hello! |
Hi @oliviertassinari - can you please assign this issue to me ? |
Hello, I'd like to know if this issue is still persist for me to pull and work on? |
hi , can i work on this |
Hi, let me know if I can start working on it. Looking to start my open source journey. Thanks |
@zanivan What should be the line-height for Material UI Button? |
On Material Design 2 the
|
For anyone who is interested to submit a PR, here is the fix: diff --git a/packages/mui-material/src/styles/createTypography.js b/packages/mui-material/src/styles/createTypography.js
index 277808d2a7..32b5e9f790 100644
--- a/packages/mui-material/src/styles/createTypography.js
+++ b/packages/mui-material/src/styles/createTypography.js
@@ -69,7 +69,7 @@ export default function createTypography(palette, typography) {
subtitle2: buildVariant(fontWeightMedium, 14, 1.57, 0.1),
body1: buildVariant(fontWeightRegular, 16, 1.5, 0.15),
body2: buildVariant(fontWeightRegular, 14, 1.43, 0.15),
- button: buildVariant(fontWeightMedium, 14, 1.75, 0.4, caseAllCaps),
+ button: buildVariant(fontWeightMedium, 14, 1.5, 0.4, caseAllCaps),
caption: buildVariant(fontWeightRegular, 12, 1.66, 0.4),
overline: buildVariant(fontWeightRegular, 12, 2.66, 1, caseAllCaps),
// TODO v6: Remove handling of 'inherit' variant from the theme as it is already handled in Material UI's Typography component. Also, remember to remove the associated types.
|
Hi, I am interested to Contribute with MUI and it would be an start point if this issue is not assigned to anyone |
Hello everyone |
Steps to reproduce 🕹
Link to live example:
Steps:
Current behavior 😯
Expected behavior 🤔
Context 🔦
It looks more correct on Material UI:
https://codesandbox.io/s/peaceful-khorana-27gct9
but a lower line-height would I think feel better.
Your environment 🌎
npx @mui/envinfo
The text was updated successfully, but these errors were encountered: