Skip to content

Commit 169643d

Browse files
committed
refactor: reduce Card component spacing for more compact design
Update Card padding and spacing values to create a tighter, more efficient layout: - Reduce gap between card parts from 12px to 8px - Update Card.Body internal gap from 12px to 8px - Adjust default Card padding prop to var(--ai-spacing-8) (16px) These changes create a more compact card design while maintaining readability.
1 parent 3876c40 commit 169643d

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

packages/ui/src/components/Card/Card.module.css

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
position: relative;
44
display: flex;
55
flex-direction: column;
6-
gap: var(--ai-spacing-6); /* 12px - default spacing between compound components */
6+
gap: var(--ai-spacing-4); /* 8px - default spacing between compound components */
77
box-sizing: border-box;
88
background: color-mix(
99
in srgb,
@@ -13,7 +13,7 @@
1313
border-radius: var(--ai-radius-xl);
1414
border: 0.5px solid var(--card-border-color, var(--ai-color-border-heavy));
1515
box-shadow: var(--card-shadow-value, var(--ai-elevation-1-shadow));
16-
padding: var(--ai-spacing-16);
16+
padding: var(--ai-spacing-2);
1717
overflow: hidden;
1818
transition:
1919
transform 0.2s ease,

packages/ui/src/components/Card/Card.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ const CardBase = React.forwardRef<HTMLDivElement, CardProps>((props, ref) => {
101101
border = 'heavy',
102102
hoverElevationLevel,
103103
interactive = false,
104-
padding = 'var(--ai-spacing-12)',
104+
padding = 'var(--ai-spacing-8)',
105105
loading = false,
106106
skeleton,
107107
error = false,

packages/ui/src/components/Card/CardParts.module.css

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
.cardBody {
1010
display: flex;
1111
flex-direction: column;
12-
gap: var(--ai-spacing-6); /* 12px - comfortable spacing for main content */
12+
gap: var(--ai-spacing-4); /* 8px - comfortable spacing for main content */
1313
flex: 1;
1414
}
1515

0 commit comments

Comments
 (0)