mirror of
https://github.com/ant-design/ant-design.git
synced 2026-02-09 02:49:18 +08:00
chore: merge two variables into one (#55241)
This commit is contained in:
@@ -93,22 +93,18 @@ const genBorderedStyle = (token: ListToken): CSSObject => {
|
||||
borderRadiusLG,
|
||||
} = token;
|
||||
|
||||
// Inner radius = Outer radius - border width; this prevents white gaps from appearing at the top corners.
|
||||
const topCornerBorderRadius = unit(token.calc(borderRadiusLG).sub(token.lineWidth).equal());
|
||||
|
||||
// Inner radius = Outer radius - border width; this prevents white gaps from appearing at the bottom corners.
|
||||
const bottomCornerBorderRadius = unit(token.calc(borderRadiusLG).sub(token.lineWidth).equal());
|
||||
const innerCornerBorderRadius = unit(token.calc(borderRadiusLG).sub(token.lineWidth).equal());
|
||||
|
||||
return {
|
||||
[listBorderedCls]: {
|
||||
border: `${unit(token.lineWidth)} ${token.lineType} ${token.colorBorder}`,
|
||||
borderRadius: borderRadiusLG,
|
||||
[`${componentCls}-header`]: {
|
||||
borderRadius: `${topCornerBorderRadius} ${topCornerBorderRadius} 0 0`,
|
||||
borderRadius: `${innerCornerBorderRadius} ${innerCornerBorderRadius} 0 0`,
|
||||
},
|
||||
|
||||
[`${componentCls}-footer`]: {
|
||||
borderRadius: `0 0 ${bottomCornerBorderRadius} ${bottomCornerBorderRadius}`,
|
||||
borderRadius: `0 0 ${innerCornerBorderRadius} ${innerCornerBorderRadius}`,
|
||||
},
|
||||
|
||||
[`${componentCls}-header,${componentCls}-footer,${componentCls}-item`]: {
|
||||
|
||||
Reference in New Issue
Block a user