From 008a6c7fa19c42788df5e83b5cc595a39c4d6434 Mon Sep 17 00:00:00 2001 From: Julian Skinner Date: Thu, 1 Aug 2024 10:04:46 -0500 Subject: [PATCH] revert(font-weight): combine font-weights back to *00 based fix: DSS-752 --- .../sage-assets/lib/stylesheets/global/_reboot.scss | 2 +- .../lib/stylesheets/tokens/_font_weight.scss | 13 +------------ .../lib/stylesheets/tokens/_type_specs.scss | 12 ++++++------ 3 files changed, 8 insertions(+), 19 deletions(-) diff --git a/packages/sage-assets/lib/stylesheets/global/_reboot.scss b/packages/sage-assets/lib/stylesheets/global/_reboot.scss index 6e3f6b8851..4027b87e93 100644 --- a/packages/sage-assets/lib/stylesheets/global/_reboot.scss +++ b/packages/sage-assets/lib/stylesheets/global/_reboot.scss @@ -37,7 +37,7 @@ body { "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji"; font-feature-settings: "liga" 1, "calt" 1; /* fix for Chrome */ font-size: 1rem; - font-weight: 425; + font-weight: 400; line-height: 1.5; /* NOTE: line-height must be '1.5' to avoid conflicts with Ladera */ text-align: left; } diff --git a/packages/sage-assets/lib/stylesheets/tokens/_font_weight.scss b/packages/sage-assets/lib/stylesheets/tokens/_font_weight.scss index 1348b761af..cf1a7ff951 100644 --- a/packages/sage-assets/lib/stylesheets/tokens/_font_weight.scss +++ b/packages/sage-assets/lib/stylesheets/tokens/_font_weight.scss @@ -9,13 +9,6 @@ /// Sage font weights token /// $sage-font-weights: ( - regular: 425, - medium: 525, - semibold: 625, - bold: 725 -); - -$sage-heading-font-weights: ( regular: 400, medium: 500, semibold: 600, @@ -29,12 +22,8 @@ $sage-heading-font-weights: ( /// /// @return {number} The value retrieved /// -@function sage-font-weight($key: regular, $heading: false) { +@function sage-font-weight($key: regular) { $value: map-get($sage-font-weights, $key); - @if $heading { - $value: map-get($sage-heading-font-weights, $key); - } - @return $value; } diff --git a/packages/sage-assets/lib/stylesheets/tokens/_type_specs.scss b/packages/sage-assets/lib/stylesheets/tokens/_type_specs.scss index 0a3d5ab30b..2d643b3d25 100644 --- a/packages/sage-assets/lib/stylesheets/tokens/_type_specs.scss +++ b/packages/sage-assets/lib/stylesheets/tokens/_type_specs.scss @@ -83,37 +83,37 @@ $sage-type-specs: ( kerning: sage-letter-spacing(5xl), responsive: true, type-pairing: h1, - weight: sage-font-weight(semibold, true), + weight: sage-font-weight(semibold), ), "heading-2": ( kerning: sage-letter-spacing(4xl), responsive: true, type-pairing: h2, - weight: sage-font-weight(semibold, true), + weight: sage-font-weight(semibold), ), "heading-3": ( kerning: sage-letter-spacing(3xl), responsive: true, type-pairing: h3, - weight: sage-font-weight(semibold, true), + weight: sage-font-weight(semibold), ), "heading-4": ( kerning: sage-letter-spacing(2xl), responsive: true, type-pairing: h4, - weight: sage-font-weight(semibold, true), + weight: sage-font-weight(semibold), ), "heading-5": ( kerning: sage-letter-spacing(xl), responsive: true, type-pairing: h5, - weight: sage-font-weight(medium, true), + weight: sage-font-weight(medium), ), "heading-6": ( kerning: sage-letter-spacing(lg), responsive: true, type-pairing: h6, - weight: sage-font-weight(medium, true), + weight: sage-font-weight(medium), ), "nav": ( responsive: false,