Skip to content

Commit d7633cd

Browse files
authored
Merge pull request #24 from rangle/fix/add-unit-to-line-height
fix(product-card): standardize CSS formatting and correct line-height…
2 parents 65ee484 + 74b2259 commit d7633cd

File tree

2 files changed

+10
-8
lines changed

2 files changed

+10
-8
lines changed

apps/demo/.storybook/preview.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ const preview: Preview = {
1313
brands: {
1414
name: "Brands",
1515
description: "Design System Supported Brands",
16-
defaultValue: "Brand 1",
16+
defaultValue: "brand-1",
1717
toolbar: {
1818
title: "Brands",
1919
icon: "paintbrush",

packages/ui/components/product-card/product-card.css

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
@import '@repo/foundations/styles';
1+
@import "@repo/foundations/styles";
22

33
.ds-product-card,
44
.ds-product-card * {
@@ -13,7 +13,8 @@
1313
box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
1414
padding: var(--breakpoint-static-padding-default);
1515
width: fit-content;
16-
font-family: var(--brand-font-family-sans), 'Helvetica Neue', Helvetica, Arial, sans-serif;
16+
font-family: var(--brand-font-family-sans), "Helvetica Neue", Helvetica, Arial,
17+
sans-serif;
1718
}
1819

1920
.ds-product-card__header {
@@ -32,13 +33,14 @@
3233
color: var(--semantic-static-text-color-strong);
3334
font-size: var(--typography-title-font-size-lg);
3435
font-weight: var(--brand-font-weight-bold);
35-
line-height: var(--typography-title-line-height-lg);
36+
line-height: var(--typography-title-line-height-lg) px;
3637
}
3738

3839
.ds-product-card__badge {
3940
background-color: var(--semantic-action-background-color-primary);
4041
color: var(--semantic-action-text-color-default);
41-
padding: var(--breakpoint-action-padding-xs) var(--breakpoint-action-padding-sm);
42+
padding: var(--breakpoint-action-padding-xs)
43+
var(--breakpoint-action-padding-sm);
4244
border-radius: var(--density-action-border-radius-default);
4345
font-size: var(--typography-label-font-size-default);
4446
font-weight: var(--brand-font-weight-bold);
@@ -48,7 +50,7 @@
4850
color: var(--semantic-static-text-color-strong);
4951
font-size: var(--typography-title-font-size-md);
5052
font-weight: var(--brand-font-weight-bold);
51-
line-height: var(--typography-title-line-height-md);
53+
line-height: var(--typography-title-line-height-md) px;
5254
}
5355

5456
.ds-product-card__features {
@@ -72,7 +74,7 @@
7274
.ds-product-card__feature-text {
7375
color: var(--semantic-static-text-color-default);
7476
font-size: var(--typography-body-font-size-2);
75-
line-height: var(--typography-body-line-height-2);
77+
line-height: var(--typography-body-line-height-2) px;
7678
}
7779

7880
.ds-product-card__footer {
@@ -88,5 +90,5 @@
8890
.ds-product-card__footer-text {
8991
color: var(--semantic-static-text-color-muted);
9092
font-size: var(--typography-label-font-size-default);
91-
line-height: var(--typography-label-line-height-default);
93+
line-height: var(--typography-label-line-height-default) px;
9294
}

0 commit comments

Comments
 (0)