From 32d8a81b711fbca1ddc88b58dcd7fb583c2be4f8 Mon Sep 17 00:00:00 2001 From: seeratawan01 Date: Sat, 3 Dec 2022 19:36:25 +0500 Subject: [PATCH 1/2] [@mantine/core] Table: Fix wrong styling with borders and rowspan --- src/mantine-core/src/Table/Table.styles.ts | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/src/mantine-core/src/Table/Table.styles.ts b/src/mantine-core/src/Table/Table.styles.ts index e14d6f0093d..2c9cbd72a53 100644 --- a/src/mantine-core/src/Table/Table.styles.ts +++ b/src/mantine-core/src/Table/Table.styles.ts @@ -65,18 +65,24 @@ 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)': { backgroundColor: theme.colorScheme === 'dark' ? theme.colors.dark[6] : theme.colors.gray[0], From 9073e05d6fe4dadce57412c3043bf403aa0c5d70 Mon Sep 17 00:00:00 2001 From: seeratawan01 Date: Sun, 4 Dec 2022 00:16:35 +0500 Subject: [PATCH 2/2] [@mantine/core] Table: Fix style.css file lint --- src/mantine-core/src/Table/Table.styles.ts | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/mantine-core/src/Table/Table.styles.ts b/src/mantine-core/src/Table/Table.styles.ts index 2c9cbd72a53..6097445b468 100644 --- a/src/mantine-core/src/Table/Table.styles.ts +++ b/src/mantine-core/src/Table/Table.styles.ts @@ -79,10 +79,9 @@ export default createStyles( '&:last-of-type': { borderRight: 'none', borderLeft: withColumnBorders ? border : 'none', - } + }, }, - '&[data-striped] tbody tr:nth-of-type(odd)': { backgroundColor: theme.colorScheme === 'dark' ? theme.colors.dark[6] : theme.colors.gray[0],