Skip to content

Commit

Permalink
style(heading): update font-weights back to 100 based scale (#1912)
Browse files Browse the repository at this point in the history
Co-authored-by: Julian Skinner <[email protected]>
  • Loading branch information
ju-Skinner and kajabi-bot committed Jul 29, 2024
1 parent 6ac0d7a commit d8ceef8
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 7 deletions.
14 changes: 13 additions & 1 deletion packages/sage-assets/lib/stylesheets/tokens/_font_weight.scss
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,26 @@ $sage-font-weights: (
bold: 725
);

$sage-heading-font-weights: (
regular: 400,
medium: 500,
semibold: 600,
bold: 700
);

///
/// Sage font weight token utility
///
/// @param {string} $key [regular] The token to retrieve
///
/// @return {number} The value retrieved
///
@function sage-font-weight($key: regular) {
@function sage-font-weight($key: regular, $heading: false) {
$value: map-get($sage-font-weights, $key);

@if $heading {
$value: map-get($sage-heading-font-weights, $key);
}

@return $value;
}
12 changes: 6 additions & 6 deletions packages/sage-assets/lib/stylesheets/tokens/_type_specs.scss
Original file line number Diff line number Diff line change
Expand Up @@ -83,37 +83,37 @@ $sage-type-specs: (
kerning: sage-letter-spacing(5xl),
responsive: true,
type-pairing: h1,
weight: sage-font-weight(semibold),
weight: sage-font-weight(semibold, true),
),
"heading-2": (
kerning: sage-letter-spacing(4xl),
responsive: true,
type-pairing: h2,
weight: sage-font-weight(semibold),
weight: sage-font-weight(semibold, true),
),
"heading-3": (
kerning: sage-letter-spacing(3xl),
responsive: true,
type-pairing: h3,
weight: sage-font-weight(semibold),
weight: sage-font-weight(semibold, true),
),
"heading-4": (
kerning: sage-letter-spacing(2xl),
responsive: true,
type-pairing: h4,
weight: sage-font-weight(semibold),
weight: sage-font-weight(semibold, true),
),
"heading-5": (
kerning: sage-letter-spacing(xl),
responsive: true,
type-pairing: h5,
weight: sage-font-weight(medium),
weight: sage-font-weight(medium, true),
),
"heading-6": (
kerning: sage-letter-spacing(lg),
responsive: true,
type-pairing: h6,
weight: sage-font-weight(medium),
weight: sage-font-weight(medium, true),
),
"nav": (
responsive: false,
Expand Down

0 comments on commit d8ceef8

Please sign in to comment.