Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove duplicate font-weight fallbacks from utilities #2430

Merged
merged 2 commits into from
Apr 27, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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