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

[Tooltip] Improve handling of small vs. touch screens #26097

Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
32 changes: 16 additions & 16 deletions packages/material-ui/src/Tooltip/Tooltip.js
Original file line number Diff line number Diff line change
Expand Up @@ -144,34 +144,34 @@ const TooltipTooltip = experimentalStyled(
/* Styles applied to the tooltip (label wrapper) element if `placement` contains "left". */
[`.${tooltipClasses.popper}[data-popper-placement*="left"] &`]: {
transformOrigin: 'right center',
marginRight: '24px',
[theme.breakpoints.up('sm')]: {
marginRight: '14px',
},
marginRight: '14px',
...(styleProps.touch && {
marginRight: '24px',
}),
},
/* Styles applied to the tooltip (label wrapper) element if `placement` contains "right". */
[`.${tooltipClasses.popper}[data-popper-placement*="right"] &`]: {
transformOrigin: 'left center',
marginLeft: '24px',
[theme.breakpoints.up('sm')]: {
marginLeft: '14px',
},
marginLeft: '14px',
...(styleProps.touch && {
marginLeft: '24px',
}),
},
/* Styles applied to the tooltip (label wrapper) element if `placement` contains "top". */
[`.${tooltipClasses.popper}[data-popper-placement*="top"] &`]: {
transformOrigin: 'center bottom',
marginBottom: '24px',
[theme.breakpoints.up('sm')]: {
marginBottom: '14px',
},
marginBottom: '14px',
...(styleProps.touch && {
marginBottom: '24px',
}),
},
/* Styles applied to the tooltip (label wrapper) element if `placement` contains "bottom". */
[`.${tooltipClasses.popper}[data-popper-placement*="bottom"] &`]: {
transformOrigin: 'center top',
marginTop: '24px',
[theme.breakpoints.up('sm')]: {
marginTop: '14px',
},
marginTop: '14px',
...(styleProps.touch && {
marginTop: '24px',
}),
},
}));

Expand Down