Skip to content

Commit

Permalink
fix: checkbox line height, vertical adjustment
Browse files Browse the repository at this point in the history
  • Loading branch information
malangcat committed Dec 23, 2024
1 parent 25cab38 commit 02ad037
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 9 deletions.
10 changes: 6 additions & 4 deletions packages/recipe-generator/preset/src/checkbox.recipe.ts
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,6 @@ const checkbox = defineRecipe({
},
label: {
color: vars.base.enabled.label.color,
lineHeight: vars.base.enabled.label.lineHeight,
},
},
variants: {
Expand Down Expand Up @@ -152,7 +151,8 @@ const checkbox = defineRecipe({
},
label: {
fontSize: vars.sizeLarge.enabled.label.fontSize,
marginBlockStart: "7px", // 수직 위치 보정
lineHeight: vars.sizeLarge.enabled.label.lineHeight,
marginBlockStart: "calc(18px - 0.65625rem)", // 수직 위치 보정, 18 - label.lineHeight / 2
},
},
medium: {
Expand All @@ -167,7 +167,8 @@ const checkbox = defineRecipe({
},
label: {
fontSize: vars.sizeMedium.enabled.label.fontSize,
marginBlockStart: "6px", // 수직 위치 보정
lineHeight: vars.sizeMedium.enabled.label.lineHeight,
marginBlockStart: "calc(16px - 0.59375rem)", // 수직 위치 보정, 16 - label.lineHeight / 2
},
},
small: {
Expand All @@ -182,7 +183,8 @@ const checkbox = defineRecipe({
},
label: {
fontSize: vars.sizeSmall.enabled.label.fontSize,
marginBlockStart: "5px", // 수직 위치 보정
lineHeight: vars.sizeSmall.enabled.label.lineHeight,
marginBlockStart: "calc(14px - 0.5625rem)", // 수직 위치 보정, 14 - label.lineHeight / 2
},
},
},
Expand Down
1 change: 0 additions & 1 deletion packages/rootage/artifacts/components/checkbox.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ data:
enabled:
label:
color: $color.fg.neutral
lineHeight: $line-height.s5
root:
gap: $unit.s2
bold:
Expand Down
10 changes: 6 additions & 4 deletions packages/stylesheet/checkbox.css
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@
}
.checkbox__label {
color: var(--seed-v3-color-fg-neutral);
line-height: var(--seed-v3-line-height-s5);
}
.checkbox__label--bold_true {
font-weight: var(--seed-v3-font-weight-bold);
Expand Down Expand Up @@ -114,7 +113,8 @@
}
.checkbox__label--size_large {
font-size: var(--seed-v3-font-size-s5);
margin-block-start: 7px;
line-height: var(--seed-v3-line-height-s5);
margin-block-start: calc(18px - 0.65625rem);
}
.checkbox__root--size_medium {
min-height: var(--seed-v3-unit-s8);
Expand All @@ -127,7 +127,8 @@
}
.checkbox__label--size_medium {
font-size: var(--seed-v3-font-size-s4);
margin-block-start: 6px;
line-height: var(--seed-v3-line-height-s4);
margin-block-start: calc(16px - 0.59375rem);
}
.checkbox__root--size_small {
min-height: var(--seed-v3-unit-s8);
Expand All @@ -140,7 +141,8 @@
}
.checkbox__label--size_small {
font-size: var(--seed-v3-font-size-s3);
margin-block-start: 5px;
line-height: var(--seed-v3-line-height-s3);
margin-block-start: calc(14px - 0.5625rem);
}
.checkbox__icon--size_small-variant_ghost {
width: 13.5px;
Expand Down

0 comments on commit 02ad037

Please sign in to comment.