-
-
Notifications
You must be signed in to change notification settings - Fork 1.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
Components: Fix subtle layout differences #8884
Comments
The sizes in the ToggleGroup were changed in #8676 and @henon suggested staking them to the Button sizes for consistency. I said we should explore changing both to a new standard to improve the quality. This issue was opened to let us discuss this idea in a wider context. We need to at least make a decision on the Button and ToggleGroup sizes before v7 is released. |
I am all for standardization of sizes. Currently the elements feel like a zoo if you align them next to each other ;). Off-Topic: Maybe in the process we could aslo finally center the button text vertically. Currently it is slightly off-center (due to the font underline??) which is funny as the button caption is all capitalized. And even if it weren't, it would still look better were it perfectly centered. |
Yes of course the component dimensions will have to shrink accordingly |
We need to consider font sizes as well. Button and ToggleGroup (for example) should have the same dimensions AND text size. What does it look like in Material Design 2? That's what we should aim for. |
MD2 buttons remain at a fixed height of 36px no matter what content is added. In our Styled Button example, we manually change the height. |
@danielchalmers the button height is also very dependent on that text line height value. Setting the line height to "1" results in the icon with buttons locking like this: |
Is your feature request related to a problem?
Dimensions are not always consistent between components and some use fractional pixels by default.
Describe the solution you'd like
Go over the sizes of various components and make sure they are exactly to our standard.
Many are 32px or 48px which is perfect already (200% or 300% default font size)
I've debated the idea of moving over to relative units but we really should just stick to pixels when the library is already this mature.
It's not just the raw size though, you have to take into account border sizes, misaligned borders, line height, etc.
Have you seen this feature anywhere else?
https://m2.material.io/components
https://m2.material.io/components/buttons#specs
https://m2.material.io/components/snackbars#specs
Describe alternatives you've considered
No response
Pull Request
Code of Conduct
The text was updated successfully, but these errors were encountered: