diff --git a/change/@fluentui-react-table-bb51d6ec-6257-488a-b412-18e3acb470cf.json b/change/@fluentui-react-table-bb51d6ec-6257-488a-b412-18e3acb470cf.json new file mode 100644 index 0000000000000..08f071dd912f0 --- /dev/null +++ b/change/@fluentui-react-table-bb51d6ec-6257-488a-b412-18e3acb470cf.json @@ -0,0 +1,7 @@ +{ + "type": "patch", + "comment": "fix: remove row focus background color ", + "packageName": "@fluentui/react-table", + "email": "lingfangao@hotmail.com", + "dependentChangeType": "patch" +} diff --git a/packages/react-components/react-table/src/components/TableCell/useTableCellStyles.styles.ts b/packages/react-components/react-table/src/components/TableCell/useTableCellStyles.styles.ts index ef1c3afbac308..5ca0fb171f31f 100644 --- a/packages/react-components/react-table/src/components/TableCell/useTableCellStyles.styles.ts +++ b/packages/react-components/react-table/src/components/TableCell/useTableCellStyles.styles.ts @@ -54,7 +54,6 @@ const useFlexLayoutStyles = makeStyles({ */ const useStyles = makeStyles({ root: { - backgroundColor: 'inherit', position: 'relative', ...shorthands.padding('0px', tokens.spacingHorizontalS), diff --git a/packages/react-components/react-table/src/components/TableRow/useTableRowStyles.styles.ts b/packages/react-components/react-table/src/components/TableRow/useTableRowStyles.styles.ts index aa7efb0d073cd..a56f3e60d2bd3 100644 --- a/packages/react-components/react-table/src/components/TableRow/useTableRowStyles.styles.ts +++ b/packages/react-components/react-table/src/components/TableRow/useTableRowStyles.styles.ts @@ -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, @@ -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, );