Skip to content

Commit

Permalink
Correct baseline grid alignment
Browse files Browse the repository at this point in the history
  • Loading branch information
bartaz committed Jul 20, 2023
1 parent 0244094 commit e4b9091
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
5 changes: 4 additions & 1 deletion scss/_base_typography-definitions.scss
Original file line number Diff line number Diff line change
Expand Up @@ -41,11 +41,14 @@
font-size: #{map-get($font-sizes, display-mobile)}rem;
font-weight: 100;
line-height: map-get($line-heights, display-mobile);
padding-top: 0;
margin-bottom: map-get($sp-after, display-mobile) - map-get($nudges, display-mobile);
padding-top: map-get($nudges, display-mobile);

@media (min-width: $breakpoint-heading-threshold) {
font-size: #{map-get($font-sizes, display)}rem;
line-height: map-get($line-heights, display);
margin-bottom: map-get($sp-after, display) - map-get($nudges, display);
padding-top: map-get($nudges, display);
}
}

Expand Down
4 changes: 4 additions & 0 deletions scss/_settings_spacing.scss
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,8 @@ $line-heights: (

// baseline nudges for type scale ratio of (16/14)^2
$nudges: (
display: 0.35rem,
display-mobile: 0.25rem,
h1-large: 0.55rem,
h1-mobile: 0.55rem,
h1: 0.55rem,
Expand Down Expand Up @@ -92,6 +94,8 @@ $sph--x-large: $sp-unit * 3 !default;

// Space after text elements
$sp-after: (
display: $spv--x-large,
display-mobile: $spv--x-large,
h1: $spv--x-large,
h1-mobile: $spv--x-large,
h2: $spv--x-large,
Expand Down

0 comments on commit e4b9091

Please sign in to comment.