style: fix Table border and radius issues (#41985)

* style: fix Table border details

* style: fix Table border details
This commit is contained in:
afc163 2023-04-25 23:17:20 +08:00 committed by GitHub
parent 709e910fd0
commit 3a5413315d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 12 additions and 18 deletions

View File

@ -39,6 +39,7 @@ const genBorderedStyle: GenerateStyle<TableToken, CSSObject> = (token) => {
// ============================ Content ============================
[`> ${componentCls}-container`]: {
borderInlineStart: tableBorder,
borderTop: tableBorder,
[`
> ${componentCls}-content,
@ -50,6 +51,7 @@ const genBorderedStyle: GenerateStyle<TableToken, CSSObject> = (token) => {
// ============================= Cell =============================
[`
> thead > tr > th,
> thead > tr > td,
> tbody > tr > th,
> tbody > tr > td,
> tfoot > tr > th,
@ -102,15 +104,6 @@ const genBorderedStyle: GenerateStyle<TableToken, CSSObject> = (token) => {
},
},
},
[`
> ${componentCls}-content,
> ${componentCls}-header
`]: {
'> table': {
borderTop: tableBorder,
},
},
},
// ============================ Scroll ============================
@ -159,6 +152,10 @@ const genBorderedStyle: GenerateStyle<TableToken, CSSObject> = (token) => {
boxShadow: `0 ${token.lineWidth}px 0 ${token.lineWidth}px ${token.tableHeaderBg}`,
},
},
[`${componentCls}-bordered ${componentCls}-cell-scrollbar`]: {
borderInlineEnd: tableBorder,
},
},
};
};

View File

@ -16,17 +16,14 @@ const genRadiusStyle: GenerateStyle<TableToken, CSSObject> = (token) => {
borderStartStartRadius: 0,
borderStartEndRadius: 0,
table: {
// https://github.com/ant-design/ant-design/issues/41975
[`${componentCls}-header, table`]: {
borderRadius: 0,
},
'> thead > tr:first-child': {
'th:first-child': {
borderRadius: 0,
},
'th:last-child': {
borderRadius: 0,
},
'table > thead > tr:first-child': {
'th:first-child, th:last-child, td:first-child, td:last-child': {
borderRadius: 0,
},
},
},