-
-
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
[Tabs] Update min
& max
width and remove minWidth
media query
#26458
Conversation
@@ -122,6 +119,7 @@ const TabWrapper = experimentalStyled('span', { | |||
justifyContent: 'center', | |||
width: '100%', | |||
flexDirection: 'column', | |||
lineHeight: 1.25, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
current wrapper inherit line-height: 1.75
which ~24px make 2 lines looks wierd. using 1.25
make it looks closer to the spec.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good
min
& max
width and remove minWidth
media querymin
& max
width and remove minWidth
media query
overflow: 'hidden', | ||
whiteSpace: 'normal', | ||
textAlign: 'center', | ||
[theme.breakpoints.up('sm')]: { | ||
minWidth: 160, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This change actually makes the minWidth
smaller on up-sm
. From 160px
to 90px
. Please add more detail on the migration page thanks.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Rollback to old behavior:
MuiTab: {
styleOverrides: {
root: {
// up-sm
'@media screen and (min-width: 600px)': {
minWidth: 160,
},
},
},
},
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The described outcome is expected. I guess we can clarify https://next.material-ui.com/guides/migration-v4/#tab
closes #15824
The change follow material design spec
Preview: https://deploy-preview-26458--material-ui.netlify.app/components/tabs/