diff --git a/packages/material-ui/src/TableRow/TableRow.js b/packages/material-ui/src/TableRow/TableRow.js index d00b2e65d6c6cb..94e35604245c51 100644 --- a/packages/material-ui/src/TableRow/TableRow.js +++ b/packages/material-ui/src/TableRow/TableRow.js @@ -13,17 +13,11 @@ export const styles = theme => ({ verticalAlign: 'middle', // We disable the focus ring for mouse, touch and keyboard users. outline: 0, - '&$selected': { - backgroundColor: - theme.palette.type === 'light' - ? fade(theme.palette.secondary.main, 0.04) - : 'rgba(255, 255, 255, 0.08)', + '&$hover:hover': { + backgroundColor: theme.palette.action.hover, }, - '&$hover:not($selected):hover': { - backgroundColor: - theme.palette.type === 'light' - ? theme.palette.action.hover - : 'rgba(255, 255, 255, 0.14)', + '&$selected,&$selected:hover': { + backgroundColor: fade(theme.palette.secondary.main, theme.palette.action.selectedOpacity), }, }, /* Pseudo-class applied to the root element if `selected={true}`. */ diff --git a/packages/material-ui/src/styles/createPalette.js b/packages/material-ui/src/styles/createPalette.js index 32db973fe4c7b2..cbb66038ff7192 100644 --- a/packages/material-ui/src/styles/createPalette.js +++ b/packages/material-ui/src/styles/createPalette.js @@ -34,10 +34,11 @@ export const light = { // The color of an active action like an icon button. active: 'rgba(0, 0, 0, 0.54)', // The color of an hovered action. - hover: 'rgba(0, 0, 0, 0.08)', - hoverOpacity: 0.08, + hover: 'rgba(0, 0, 0, 0.04)', + hoverOpacity: 0.04, // The color of a selected action. - selected: 'rgba(0, 0, 0, 0.14)', + selected: 'rgba(0, 0, 0, 0.08)', + selectedOpacity: 0.08, // The color of a disabled action. disabled: 'rgba(0, 0, 0, 0.26)', // The background color of a disabled action. @@ -60,9 +61,10 @@ export const dark = { }, action: { active: common.white, - hover: 'rgba(255, 255, 255, 0.1)', - hoverOpacity: 0.1, - selected: 'rgba(255, 255, 255, 0.2)', + hover: 'rgba(255, 255, 255, 0.08)', + hoverOpacity: 0.08, + selected: 'rgba(255, 255, 255, 0.16)', + selectedOpacity: 0.16, disabled: 'rgba(255, 255, 255, 0.3)', disabledBackground: 'rgba(255, 255, 255, 0.12)', },