Skip to content

Commit 41ab977

Browse files
authored
Revert an unexpected commit (#714)
* Fix doc home cards display issue * Adjust DocHome TOC typography and spacing Tweak styles in DocHome: update heading color and weight, add bottom padding, and switch to website color tokens. Adjust TOC link sizing and vertical padding (14px→13px, 0.25rem→4px) and change hover behavior to set color and a left border instead of bolding text. These changes improve contrast and provide a clearer hover indicator for table-of-contents entries. * Revert "Adjust DocHome TOC typography and spacing" This reverts commit a7688c4.
1 parent bcab1e1 commit 41ab977

1 file changed

Lines changed: 2 additions & 13 deletions

File tree

src/components/MDXComponents/DocHome.tsx

Lines changed: 2 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -341,10 +341,7 @@ export function DocHomeCardContainer(props: any) {
341341
sm: "grid",
342342
},
343343
flexDirection: "column",
344-
gridTemplateColumns: {
345-
sm: "repeat(2, minmax(0, 1fr))",
346-
lg: "repeat(3, minmax(0, 1fr))",
347-
},
344+
gridTemplateColumns: "repeat(auto-fit, minmax(224px, 30%))",
348345
gap: "1.25rem",
349346
justifyContent: "start",
350347

@@ -366,7 +363,6 @@ interface DocHomeCardProps {
366363
icon: string;
367364
label: string;
368365
colSpan?: 1 | 2 | 3;
369-
colspan?: 1 | 2 | 3;
370366
actionBtnLabel?: string;
371367
ctaGraphic?: string;
372368
}
@@ -378,11 +374,9 @@ export function DocHomeCard(props: React.PropsWithChildren<DocHomeCardProps>) {
378374
icon = "global-tidb-product",
379375
label,
380376
colSpan,
381-
colspan,
382377
actionBtnLabel,
383378
ctaGraphic,
384379
} = props;
385-
const cardColSpan = colSpan ?? colspan;
386380

387381
return (
388382
<Box
@@ -397,12 +391,7 @@ export function DocHomeCard(props: React.PropsWithChildren<DocHomeCardProps>) {
397391
padding: "24px",
398392
transition: ".5s",
399393
border: `1px solid ${theme.palette.carbon[400]}`,
400-
gridColumn: cardColSpan
401-
? {
402-
sm: `span ${Math.min(cardColSpan, 2)}`,
403-
lg: `span ${cardColSpan}`,
404-
}
405-
: undefined,
394+
gridColumn: colSpan ? `span ${colSpan}` : undefined,
406395

407396
"&:hover": {
408397
background:

0 commit comments

Comments
 (0)