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] Fix flip invalid CSS property error #20745

Merged
merged 3 commits into from
Apr 25, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 2 additions & 11 deletions packages/material-ui/src/Tooltip/Tooltip.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ function round(value) {
function arrowGenerator() {
return {
'&[x-placement*="bottom"] $arrow': {
flip: false,
top: 0,
left: 0,
marginTop: '-0.95em',
Expand All @@ -31,13 +30,11 @@ function arrowGenerator() {
width: '2em',
height: '1em',
'&::before': {
flip: false,
oliviertassinari marked this conversation as resolved.
Show resolved Hide resolved
borderWidth: '0 1em 1em 1em',
borderColor: 'transparent transparent currentcolor transparent',
},
},
'&[x-placement*="top"] $arrow': {
flip: false,
bottom: 0,
left: 0,
marginBottom: '-0.95em',
Expand All @@ -46,35 +43,30 @@ function arrowGenerator() {
width: '2em',
height: '1em',
'&::before': {
flip: false,
borderWidth: '1em 1em 0 1em',
borderColor: 'currentcolor transparent transparent transparent',
},
},
'&[x-placement*="right"] $arrow': {
flip: false,
left: 0,
marginLeft: '-0.95em',
marginTop: 4,
marginBottom: 4,
height: '2em',
width: '1em',
'&::before': {
flip: false,
borderWidth: '1em 1em 1em 0',
borderColor: 'transparent currentcolor transparent transparent',
},
},
'&[x-placement*="left"] $arrow': {
flip: false,
right: 0,
marginRight: '-0.95em',
marginTop: 4,
marginBottom: 4,
height: '2em',
width: '1em',
'&::before': {
flip: false,
borderWidth: '1em 0 1em 1em',
borderColor: 'transparent transparent transparent currentcolor',
},
Expand All @@ -86,8 +78,7 @@ export const styles = (theme) => ({
/* Styles applied to the Popper component. */
popper: {
zIndex: theme.zIndex.tooltip,
pointerEvents: 'none',
flip: false, // disable jss-rtl plugin
pointerEvents: 'none', // disable jss-rtl plugin
},
/* Styles applied to the Popper component if `interactive={true}`. */
popperInteractive: {
Expand Down Expand Up @@ -653,4 +644,4 @@ Tooltip.propTypes = {
TransitionProps: PropTypes.object,
};

export default withStyles(styles, { name: 'MuiTooltip' })(Tooltip);
export default withStyles(styles, { name: 'MuiTooltip', flip: false })(Tooltip);