Skip to content

Commit

Permalink
[@mantine/core] Table: Fix incorrect styles applied to td/th elements…
Browse files Browse the repository at this point in the history
… with borders and colspan/rowspan (#3106)

* [@mantine/core] Table: Fix wrong styling with borders and rowspan

* [@mantine/core] Table: Fix style.css file lint
  • Loading branch information
seeratawan01 committed Dec 4, 2022
1 parent 33e8d58 commit ffc603f
Showing 1 changed file with 10 additions and 5 deletions.
15 changes: 10 additions & 5 deletions src/mantine-core/src/Table/Table.styles.ts
Expand Up @@ -65,16 +65,21 @@ export default createStyles(
size: verticalSpacing,
sizes: theme.spacing,
})}px ${theme.fn.size({ size: horizontalSpacing, sizes: theme.spacing })}px`,
borderBottom: border,
borderTop: border,
fontSize: theme.fn.size({ size: fontSize, sizes: theme.fontSizes }),
},

'& tbody tr:last-of-type td': {
borderBottom: 'none',
'& tbody tr:first-of-type td': {
borderTop: 'none',
},

'& th + th, & td + td': {
borderLeft: withColumnBorders ? border : '',
'& thead th, & tbody td': {
borderRight: withColumnBorders ? border : 'none',

'&:last-of-type': {
borderRight: 'none',
borderLeft: withColumnBorders ? border : 'none',
},
},

'&[data-striped] tbody tr:nth-of-type(odd)': {
Expand Down

0 comments on commit ffc603f

Please sign in to comment.