Skip to content

Commit

Permalink
Fix MUI5 menu focus styles.
Browse files Browse the repository at this point in the history
  • Loading branch information
cbeer committed Nov 8, 2024
1 parent dd5de5b commit a5b9fbd
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 2 deletions.
10 changes: 9 additions & 1 deletion src/components/WindowThumbnailSettings.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,15 @@ const ThumbnailOption = styled(MenuItem, { name: 'WindowThumbnailSettings', slot
borderBottomColor: theme.palette.secondary.main,
}),
},
backgroundColor: 'transparent !important',
'&.Mui-selected': {
backgroundColor: 'transparent !important',
},
'&.Mui-selected.Mui-focusVisible': {
backgroundColor: `${(theme.vars || theme).palette.action.focus} !important`,
},
'&:focused': {
backgroundColor: `${(theme.vars || theme).palette.action.focus} !important`,
},
color: selected ? theme.palette.secondary.main : undefined,
display: 'inline-block',
}));
Expand Down
10 changes: 9 additions & 1 deletion src/components/WindowViewSettings.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,15 @@ const ViewOption = styled(MenuItem, { name: 'WindowViewSettings', slot: 'option'
borderBottomColor: theme.palette.secondary.main,
}),
},
backgroundColor: 'transparent !important',
'&.Mui-selected': {
backgroundColor: 'transparent !important',
},
'&.Mui-selected.Mui-focusVisible': {
backgroundColor: `${(theme.vars || theme).palette.action.focus} !important`,
},
'&:focused': {
backgroundColor: `${(theme.vars || theme).palette.action.focus} !important`,
},
color: selected ? theme.palette.secondary.main : undefined,
display: 'inline-block',
}));
Expand Down

0 comments on commit a5b9fbd

Please sign in to comment.