Skip to content

Commit

Permalink
push further
Browse files Browse the repository at this point in the history
  • Loading branch information
oliviertassinari committed Jun 21, 2020
1 parent d81c2c0 commit 54019eb
Show file tree
Hide file tree
Showing 4 changed files with 35 additions and 23 deletions.
10 changes: 5 additions & 5 deletions docs/src/pages/components/tree-view/GmailTreeView.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,8 @@ const useTreeItemStyles = makeStyles((theme) => ({
'&:hover': {
backgroundColor: theme.palette.action.hover,
},
'&$focused, &$selected': {
backgroundColor: `var(--tree-view-bg-color, ${theme.palette.grey[400]})`,
'&$focused, &$selected, &$selected$focused': {
backgroundColor: `var(--tree-view-bg-color, ${theme.palette.action.selected})`,
color: 'var(--tree-view-color)',
},
},
Expand Down Expand Up @@ -65,11 +65,11 @@ const useTreeItemStyles = makeStyles((theme) => ({
function StyledTreeItem(props) {
const classes = useTreeItemStyles();
const {
labelText,
bgColor,
color,
labelIcon: LabelIcon,
labelInfo,
color,
bgColor,
labelText,
...other
} = props;

Expand Down
10 changes: 5 additions & 5 deletions docs/src/pages/components/tree-view/GmailTreeView.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,8 @@ const useTreeItemStyles = makeStyles((theme: Theme) =>
'&:hover': {
backgroundColor: theme.palette.action.hover,
},
'&$focused, &$selected': {
backgroundColor: `var(--tree-view-bg-color, ${theme.palette.grey[400]})`,
'&$focused, &$selected, &$selected$focused': {
backgroundColor: `var(--tree-view-bg-color, ${theme.palette.action.selected})`,
color: 'var(--tree-view-color)',
},
},
Expand Down Expand Up @@ -82,11 +82,11 @@ const useTreeItemStyles = makeStyles((theme: Theme) =>
function StyledTreeItem(props: StyledTreeItemProps) {
const classes = useTreeItemStyles();
const {
labelText,
bgColor,
color,
labelIcon: LabelIcon,
labelInfo,
color,
bgColor,
labelText,
...other
} = props;

Expand Down
12 changes: 9 additions & 3 deletions packages/material-ui-lab/src/PaginationItem/PaginationItem.js
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ export const styles = (theme) => ({
},
'&$selected': {
backgroundColor: theme.palette.action.selected,
'&:hover, &$focusVisible': {
'&:hover': {
backgroundColor: fade(
theme.palette.action.selected,
theme.palette.action.selectedOpacity + theme.palette.action.hoverOpacity,
Expand All @@ -49,6 +49,12 @@ export const styles = (theme) => ({
backgroundColor: theme.palette.action.selected,
},
},
'&$focusVisible': {
backgroundColor: fade(
theme.palette.action.selected,
theme.palette.action.selectedOpacity + theme.palette.action.focusOpacity,
),
},
'&$disabled': {
opacity: 1,
color: theme.palette.action.disabled,
Expand Down Expand Up @@ -135,7 +141,7 @@ export const styles = (theme) => ({
'&:hover, &$focusVisible': {
backgroundColor: fade(
theme.palette.primary.main,
theme.palette.action.activatedOpacity + theme.palette.action.hoverOpacity,
theme.palette.action.activatedOpacity + theme.palette.action.focusOpacity,
),
// Reset on touch devices, it doesn't add specificity
'@media (hover: none)': {
Expand All @@ -156,7 +162,7 @@ export const styles = (theme) => ({
'&:hover, &$focusVisible': {
backgroundColor: fade(
theme.palette.secondary.main,
theme.palette.action.activatedOpacity + theme.palette.action.hoverOpacity,
theme.palette.action.activatedOpacity + theme.palette.action.focusOpacity,
),
// Reset on touch devices, it doesn't add specificity
'@media (hover: none)': {
Expand Down
26 changes: 16 additions & 10 deletions packages/material-ui-lab/src/TreeItem/TreeItem.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,19 +37,25 @@ export const styles = (theme) => ({
},
},
'&$focused': {
backgroundColor: theme.palette.action.hover,
backgroundColor: theme.palette.action.focus,
},
'&$selected': {
backgroundColor: fade(theme.palette.primary.main, theme.palette.action.selectedOpacity),
},
'&$selected:hover, &$selected$focused': {
backgroundColor: fade(
theme.palette.primary.main,
theme.palette.action.selectedOpacity + theme.palette.action.hoverOpacity,
),
// Reset on touch devices, it doesn't add specificity
'@media (hover: none)': {
backgroundColor: 'transparent',
'&:hover': {
backgroundColor: fade(
theme.palette.primary.main,
theme.palette.action.selectedOpacity + theme.palette.action.hoverOpacity,
),
// Reset on touch devices, it doesn't add specificity
'@media (hover: none)': {
backgroundColor: fade(theme.palette.primary.main, theme.palette.action.selectedOpacity),
},
},
'&$focused': {
backgroundColor: fade(
theme.palette.primary.main,
theme.palette.action.selectedOpacity + theme.palette.action.focusOpacity,
),
},
},
},
Expand Down

0 comments on commit 54019eb

Please sign in to comment.