-
-
Notifications
You must be signed in to change notification settings - Fork 32.3k
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
[Tabs] Awkward line height when 2 lines #14538
Comments
Looks like this is intended for our components: https://material-ui.com/demos/tabs/#wrapped-labels. It probably changed in the spec. Some quick hacking with |
My point isn't that it wraps, that is the recommended way to do so in the specs, the problem is that the line height is to high and pushes the text to the top and bottom of a tab which look awkward. The space between the top and bottom line of text should be reduced. |
In the spec it looks like the font size is changed for wrapped labels. Can we do the same thing too dynamically?
What dimensions should it have and why? |
Actually, the specs seem to discourage such behavior:
And that's not what this issue is about. Anyways, instead of this: It should look like this: ...just like the specs show: no way to large As to why: just to follow the specs and because now a 2 line tab messes with the height of the tabs component while that just isn't necessary. |
@Studio384 The logic was removed in #13969. I would vote for removing the deprecated logic. I think that we should let our users handle the problem with a new property, manually. We have tried to handle the problem automatically but we can't provide a good implementation without significantly increasing the bundle size. What do you think about this strategy? |
This is not about the font size. It's about the way to large line height in tabs. |
The line height is proportional to the font size. |
I can't easily spot 2 or 4px differences. It would've been enough to say that the "tab height changes when lines are wrapped. This does not follow the spec for single lines." However the spec doesn't mention how the dimensions should be for two line tabs. It doesn't even specify what typography variant to use so we can only infer that. line-height should be proportional to font-size according to spec which goes against a fixed tab height. We need to reconcile these two facts. |
Agreed with this - if you look at https://material.io/develop/web/components/tabs/tab-bar/ the span holding the label content has |
Expected Behavior 🤔
It should look like this:
Current Behavior 😯
When a tab title takes multiple lines, the line height of
1.75
is to large.Steps to Reproduce 🕹
Link:
The text was updated successfully, but these errors were encountered: