Theme: Change body line-height to fix alignment issue (#56442)

* Theme: Change body line-height to fix alignment issue

* Updates
This commit is contained in:
Torkel Ödegaard 2022-10-06 12:59:43 +02:00 committed by GitHub
parent 55187ebc48
commit 0958d9ba55
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 2 deletions

View File

@ -115,7 +115,9 @@ export function createTypography(colors: ThemeColors, typographyInput: ThemeTypo
h4: buildVariant(fontWeightRegular, 18, 1.235, 0.25),
h5: buildVariant(fontWeightRegular, 16, 1.334, 0),
h6: buildVariant(fontWeightMedium, 14, 1.6, 0.15),
body: buildVariant(fontWeightRegular, 14, 1.5, 0.15),
// The line-height of 1.5714285714285714 results in a real line-height of 22px for the default font size. Which is an even number and result in more perfect vertical alignment
body: buildVariant(fontWeightRegular, fontSize, 1.5714285714285714, 0.15),
// The line-height of 1.5 results in a real line height of 18px for the font size of 12px
bodySmall: buildVariant(fontWeightRegular, 12, 1.5, 0.15),
};

View File

@ -112,7 +112,7 @@ $font-size-md: 14px !default;
$font-size-sm: 12px !default;
$font-size-xs: 10px !default;
$line-height-base: 1.5 !default;
$line-height-base: 1.5714285714285714 !default;
$font-weight-regular: 400 !default;
$font-weight-semi-bold: 500 !default;