Skip to content

Commit

Permalink
remove after styles if not applied
Browse files Browse the repository at this point in the history
  • Loading branch information
KevinVandy committed Jan 26, 2024
1 parent ebfb5f5 commit f522f60
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 11 deletions.
6 changes: 5 additions & 1 deletion apps/material-react-table-docs/styles/globals.css
@@ -1,5 +1,5 @@
html,
body {
background-color: #111;
padding: 0;
margin: 0;
font-family:
Expand All @@ -21,6 +21,10 @@ body {
overflow-x: hidden;
}

body {
background-color: #111;
}

a {
color: inherit;
text-decoration: none;
Expand Down
Expand Up @@ -176,12 +176,12 @@ export const MRT_TableBodyRow = <TData extends MRT_RowData>({
...tableRowProps?.style,
}}
sx={(theme: Theme) => ({
'&:hover td:after': {
backgroundColor: cellHighlightColorHover
? alpha(cellHighlightColorHover, 0.3)
: undefined,
...commonCellBeforeAfterStyles,
},
'&:hover td:after': cellHighlightColorHover
? {
backgroundColor: alpha(cellHighlightColorHover, 0.3),
...commonCellBeforeAfterStyles,
}
: undefined,
backgroundColor: `${baseBackgroundColor} !important`,
bottom:
!virtualRow && bottomPinnedIndex !== undefined && isRowPinned
Expand All @@ -199,12 +199,14 @@ export const MRT_TableBodyRow = <TData extends MRT_RowData>({
? 'sticky'
: 'relative',
td: {
'&:after': {
backgroundColor: cellHighlightColor,
...commonCellBeforeAfterStyles,
},
...getCommonPinnedCellStyles({ table, theme }),
},
'td:after': cellHighlightColor
? {
backgroundColor: cellHighlightColor,
...commonCellBeforeAfterStyles,
}
: undefined,
top: virtualRow
? 0
: topPinnedIndex !== undefined && isRowPinned
Expand Down

2 comments on commit f522f60

@vercel
Copy link

@vercel vercel bot commented on f522f60 Jan 26, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@vercel
Copy link

@vercel vercel bot commented on f522f60 Jan 26, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.