Skip to content

Commit

Permalink
fix: remove row focus background color (microsoft#29364)
Browse files Browse the repository at this point in the history
* fix: remove row focus background color

Removes the the row focus background so that focus outline in the teams
high contrast theme appears clearly

Fixes microsoft#29033

* changefile

* revert bad commit
  • Loading branch information
ling1726 authored Oct 9, 2023
1 parent c2d8618 commit d2196ea
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 14 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"type": "patch",
"comment": "fix: remove row focus background color ",
"packageName": "@fluentui/react-table",
"email": "[email protected]",
"dependentChangeType": "patch"
}
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,6 @@ const useFlexLayoutStyles = makeStyles({
*/
const useStyles = makeStyles({
root: {
backgroundColor: 'inherit',
position: 'relative',
...shorthands.padding('0px', tokens.spacingHorizontalS),

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,18 +51,6 @@ const useStyles = makeStyles({
),
},

// When focus is within the row the background colour
// should be the same as hover, except when there is a brand
// or neutral appearance applied on the row
noAppearanceFocusWithin: {
...createCustomFocusIndicatorStyle(
{
backgroundColor: tokens.colorSubtleBackgroundHover,
},
{ selector: 'focus-within' },
),
},

rootInteractive: {
':active': {
backgroundColor: tokens.colorSubtleBackgroundPressed,
Expand Down Expand Up @@ -155,7 +143,6 @@ export const useTableRowStyles_unstable = (state: TableRowState): TableRowState
styles[state.size],
state.noNativeElements ? layoutStyles.flex.root : layoutStyles.table.root,
styles[state.appearance],
state.appearance === 'none' && !state.isHeaderRow && styles.noAppearanceFocusWithin,
state.root.className,
);

Expand Down

0 comments on commit d2196ea

Please sign in to comment.