Skip to content
This repository has been archived by the owner on Aug 1, 2020. It is now read-only.

Commit

Permalink
refactor: avoid redefining already inherited font families (#112)
Browse files Browse the repository at this point in the history
fixes #42
  • Loading branch information
LeBenLeBen authored May 13, 2020
1 parent f27062d commit cfe6b96
Showing 1 changed file with 19 additions and 8 deletions.
27 changes: 19 additions & 8 deletions assets/scss/core/_mixins.scss
Original file line number Diff line number Diff line change
Expand Up @@ -60,35 +60,46 @@

@mixin font($preset) {
@if $preset == title {
font: bold 1.75rem /#{(32 / 28)} $font-family-sans-serif;
font-feature-settings: "dlig" 1;
font-size: 1.75rem;
line-height: #{(32 / 28)};
font-weight: bold;
letter-spacing: -0.025em;
font-feature-settings: "dlig" 1;
}

@if $preset == heading {
font: bold 1.3125rem /#{(24 / 21)} $font-family-sans-serif;
font-size: 1.3125rem;
line-height: #{(24 / 21)};
font-weight: bold;
font-feature-settings: "dlig" 1;
}

@if $preset == subHeading {
font: bold 1.125rem /#{(24 / 18)} $font-family-sans-serif;
font-size: 1.125rem;
line-height: #{(24 / 18)};
font-weight: bold;
font-feature-settings: "dlig" 1;
}

@if $preset == body {
font: normal 1rem /#{(24 / 16)} $font-family-sans-serif;
font-size: 1rem;
line-height: #{(24 / 16)};
}

@if $preset == caption {
font: normal 0.875rem /#{(24 / 14)} $font-family-sans-serif;
font-size: 0.875rem;
line-height: #{(24 / 14)};
}

@if $preset == code {
font: normal 0.875rem /#{(24 / 14)} $font-family-monospace;
font-family: $font-family-monospace;
font-size: 0.875rem;
line-height: #{(24 / 14)};
}

@if $preset == label {
font: normal 0.75rem /#{(20 / 12)} $font-family-sans-serif;
font-size: 0.75rem;
line-height: #{(20 / 12)};
letter-spacing: 0.075em;
text-transform: uppercase;
}
Expand Down

0 comments on commit cfe6b96

Please sign in to comment.