Skip to content

Commit aa4fe26

Browse files
update value to match spec and reduce max specificity
1 parent 9c3bf44 commit aa4fe26

File tree

2 files changed

+12
-16
lines changed

2 files changed

+12
-16
lines changed

packages/material-ui/src/TableRow/TableRow.js

+4-10
Original file line numberDiff line numberDiff line change
@@ -13,17 +13,11 @@ export const styles = theme => ({
1313
verticalAlign: 'middle',
1414
// We disable the focus ring for mouse, touch and keyboard users.
1515
outline: 0,
16-
'&$selected': {
17-
backgroundColor:
18-
theme.palette.type === 'light'
19-
? fade(theme.palette.secondary.main, 0.04)
20-
: 'rgba(255, 255, 255, 0.08)',
16+
'&$hover:hover': {
17+
backgroundColor: theme.palette.action.hover,
2118
},
22-
'&$hover:not($selected):hover': {
23-
backgroundColor:
24-
theme.palette.type === 'light'
25-
? theme.palette.action.hover
26-
: 'rgba(255, 255, 255, 0.14)',
19+
'&$selected,&$selected:hover': {
20+
backgroundColor: fade(theme.palette.secondary.main, theme.palette.action.selectedOpacity),
2721
},
2822
},
2923
/* Pseudo-class applied to the root element if `selected={true}`. */

packages/material-ui/src/styles/createPalette.js

+8-6
Original file line numberDiff line numberDiff line change
@@ -34,10 +34,11 @@ export const light = {
3434
// The color of an active action like an icon button.
3535
active: 'rgba(0, 0, 0, 0.54)',
3636
// The color of an hovered action.
37-
hover: 'rgba(0, 0, 0, 0.08)',
38-
hoverOpacity: 0.08,
37+
hover: 'rgba(0, 0, 0, 0.04)',
38+
hoverOpacity: 0.04,
3939
// The color of a selected action.
40-
selected: 'rgba(0, 0, 0, 0.14)',
40+
selected: 'rgba(0, 0, 0, 0.08)',
41+
selectedOpacity: 0.08,
4142
// The color of a disabled action.
4243
disabled: 'rgba(0, 0, 0, 0.26)',
4344
// The background color of a disabled action.
@@ -60,9 +61,10 @@ export const dark = {
6061
},
6162
action: {
6263
active: common.white,
63-
hover: 'rgba(255, 255, 255, 0.1)',
64-
hoverOpacity: 0.1,
65-
selected: 'rgba(255, 255, 255, 0.2)',
64+
hover: 'rgba(255, 255, 255, 0.08)',
65+
hoverOpacity: 0.08,
66+
selected: 'rgba(255, 255, 255, 0.16)',
67+
selectedOpacity: 0.16,
6668
disabled: 'rgba(255, 255, 255, 0.3)',
6769
disabledBackground: 'rgba(255, 255, 255, 0.12)',
6870
},

0 commit comments

Comments
 (0)