From d72656196db07a020e47919adc239f7717d3d562 Mon Sep 17 00:00:00 2001 From: Jeff Mendez Date: Fri, 24 Apr 2020 13:26:49 -0400 Subject: [PATCH 1/3] fix: remove invalid css `flip` property flip is not a valid css property. --- packages/material-ui/src/Tooltip/Tooltip.js | 9 --------- 1 file changed, 9 deletions(-) diff --git a/packages/material-ui/src/Tooltip/Tooltip.js b/packages/material-ui/src/Tooltip/Tooltip.js index 6c77af1b6602b8..afadf6275247b1 100644 --- a/packages/material-ui/src/Tooltip/Tooltip.js +++ b/packages/material-ui/src/Tooltip/Tooltip.js @@ -22,7 +22,6 @@ function round(value) { function arrowGenerator() { return { '&[x-placement*="bottom"] $arrow': { - flip: false, top: 0, left: 0, marginTop: '-0.95em', @@ -31,13 +30,11 @@ function arrowGenerator() { width: '2em', height: '1em', '&::before': { - flip: false, borderWidth: '0 1em 1em 1em', borderColor: 'transparent transparent currentcolor transparent', }, }, '&[x-placement*="top"] $arrow': { - flip: false, bottom: 0, left: 0, marginBottom: '-0.95em', @@ -46,13 +43,11 @@ 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, @@ -60,13 +55,11 @@ function arrowGenerator() { 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, @@ -74,7 +67,6 @@ function arrowGenerator() { height: '2em', width: '1em', '&::before': { - flip: false, borderWidth: '1em 0 1em 1em', borderColor: 'transparent transparent transparent currentcolor', }, @@ -87,7 +79,6 @@ export const styles = (theme) => ({ popper: { zIndex: theme.zIndex.tooltip, pointerEvents: 'none', - flip: false, // disable jss-rtl plugin }, /* Styles applied to the Popper component if `interactive={true}`. */ popperInteractive: { From 21222c70121332c5342cf87ad59844c88db6076a Mon Sep 17 00:00:00 2001 From: Olivier Tassinari Date: Sat, 25 Apr 2020 11:57:45 +0200 Subject: [PATCH 2/3] remove useless flip attribute --- packages/material-ui/src/Tooltip/Tooltip.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/packages/material-ui/src/Tooltip/Tooltip.js b/packages/material-ui/src/Tooltip/Tooltip.js index afadf6275247b1..dae5c7d6217ab2 100644 --- a/packages/material-ui/src/Tooltip/Tooltip.js +++ b/packages/material-ui/src/Tooltip/Tooltip.js @@ -22,6 +22,7 @@ function round(value) { function arrowGenerator() { return { '&[x-placement*="bottom"] $arrow': { + flip: false, top: 0, left: 0, marginTop: '-0.95em', @@ -35,6 +36,7 @@ function arrowGenerator() { }, }, '&[x-placement*="top"] $arrow': { + flip: false, bottom: 0, left: 0, marginBottom: '-0.95em', @@ -48,6 +50,7 @@ function arrowGenerator() { }, }, '&[x-placement*="right"] $arrow': { + flip: false, left: 0, marginLeft: '-0.95em', marginTop: 4, @@ -60,6 +63,7 @@ function arrowGenerator() { }, }, '&[x-placement*="left"] $arrow': { + flip: false, right: 0, marginRight: '-0.95em', marginTop: 4, @@ -79,6 +83,7 @@ export const styles = (theme) => ({ popper: { zIndex: theme.zIndex.tooltip, pointerEvents: 'none', + flip: false, // disable jss-rtl plugin }, /* Styles applied to the Popper component if `interactive={true}`. */ popperInteractive: { From 7a1bba55ae79b1c029d25b54cf95c705f97ec62e Mon Sep 17 00:00:00 2001 From: Olivier Tassinari Date: Sat, 25 Apr 2020 12:09:57 +0200 Subject: [PATCH 3/3] use style sheet option --- packages/material-ui/src/Tooltip/Tooltip.js | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/packages/material-ui/src/Tooltip/Tooltip.js b/packages/material-ui/src/Tooltip/Tooltip.js index dae5c7d6217ab2..7f9848cbba64d4 100644 --- a/packages/material-ui/src/Tooltip/Tooltip.js +++ b/packages/material-ui/src/Tooltip/Tooltip.js @@ -22,7 +22,6 @@ function round(value) { function arrowGenerator() { return { '&[x-placement*="bottom"] $arrow': { - flip: false, top: 0, left: 0, marginTop: '-0.95em', @@ -36,7 +35,6 @@ function arrowGenerator() { }, }, '&[x-placement*="top"] $arrow': { - flip: false, bottom: 0, left: 0, marginBottom: '-0.95em', @@ -50,7 +48,6 @@ function arrowGenerator() { }, }, '&[x-placement*="right"] $arrow': { - flip: false, left: 0, marginLeft: '-0.95em', marginTop: 4, @@ -63,7 +60,6 @@ function arrowGenerator() { }, }, '&[x-placement*="left"] $arrow': { - flip: false, right: 0, marginRight: '-0.95em', marginTop: 4, @@ -82,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: { @@ -649,4 +644,4 @@ Tooltip.propTypes = { TransitionProps: PropTypes.object, }; -export default withStyles(styles, { name: 'MuiTooltip' })(Tooltip); +export default withStyles(styles, { name: 'MuiTooltip', flip: false })(Tooltip);