Skip to content

Commit

Permalink
Remove duplicate font-weight fallbacks from utilities (#2430)
Browse files Browse the repository at this point in the history
* remove double fallbacks

* Create wicked-bananas-hammer.md
  • Loading branch information
langermank authored Apr 27, 2023
1 parent 713d9a5 commit c415172
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 8 deletions.
5 changes: 5 additions & 0 deletions .changeset/wicked-bananas-hammer.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@primer/css": patch
---

Remove duplicate `font-weight` fallbacks from utilities
16 changes: 8 additions & 8 deletions src/utilities/typography.scss
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@
.h4,
.h5,
.h6 {
font-weight: var(--base-text-weight-semibold, $font-weight-bold) !important;
font-weight: $font-weight-bold !important;
}

// Type utilities that match type sale
Expand Down Expand Up @@ -120,7 +120,7 @@
/* Set the font size to 40px and weight to light */
.f00-light {
font-size: var(--h00-size-mobile, $h00-size-mobile) !important;
font-weight: var(--base-text-weight-light, $font-weight-light) !important;
font-weight: $font-weight-light !important;

@include breakpoint(md) {
font-size: var(--h00-size, $h00-size) !important;
Expand All @@ -130,7 +130,7 @@
/* Set the font size to 32px and weight to light */
.f0-light {
font-size: var(--h0-size-mobile, $h0-size-mobile) !important;
font-weight: var(--base-text-weight-light, $font-weight-light) !important;
font-weight: $font-weight-light !important;

@include breakpoint(md) {
font-size: var(--h0-size, $h0-size) !important;
Expand All @@ -140,7 +140,7 @@
/* Set the font size to 26px and weight to light */
.f1-light {
font-size: var(--h1-size-mobile, $h1-size-mobile) !important;
font-weight: var(--base-text-weight-light, $font-weight-light) !important;
font-weight: $font-weight-light !important;

@include breakpoint(md) {
font-size: var(--h1-size, $h1-size) !important;
Expand All @@ -150,7 +150,7 @@
/* Set the font size to 22px and weight to light */
.f2-light {
font-size: var(--h2-size-mobile, $h2-size-mobile) !important;
font-weight: var(--base-text-weight-light, $font-weight-light) !important;
font-weight: $font-weight-light !important;

@include breakpoint(md) {
font-size: var(--h2-size, $h2-size) !important;
Expand All @@ -161,7 +161,7 @@
/* Set the font size to 18px and weight to light */
.f3-light {
font-size: var(--h3-size-mobile, $h3-size-mobile) !important;
font-weight: var(--base-text-weight-light, $font-weight-light) !important;
font-weight: $font-weight-light !important;

@include breakpoint(md) {
font-size: var(--h3-size, $h3-size) !important;
Expand All @@ -181,7 +181,7 @@
// stylelint-disable-next-line primer/spacing
margin-bottom: 30px;
font-size: var(--h3-size, $h3-size);
font-weight: var(--base-text-weight-light, $font-weight-light);
font-weight: $font-weight-light;
}

// Line-height variations
Expand Down Expand Up @@ -308,7 +308,7 @@
}

.text-emphasized {
font-weight: var(--base-text-weight-semibold, $font-weight-bold);
font-weight: $font-weight-bold;
}

// List styles
Expand Down

0 comments on commit c415172

Please sign in to comment.