Skip to content

Commit

Permalink
[a11y] Removing !important from letter-spacing marketing typograp…
Browse files Browse the repository at this point in the history
…hy (#2613)

* removing !important from letter-spacing marketing typography

* Create proud-rockets-kiss.md

---------

Co-authored-by: Katie Langerman <18661030+langermank@users.noreply.github.com>
  • Loading branch information
stamat and langermank authored May 7, 2024
1 parent c5bf346 commit 2eabfde
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 6 deletions.
5 changes: 5 additions & 0 deletions .changeset/proud-rockets-kiss.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@primer/css": patch
---

removing !important from letter-spacing marketing typography
12 changes: 6 additions & 6 deletions src/marketing/type/typography.scss
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
font-feature-settings: $mktg-font-feature-settings;
// stylelint-disable-next-line primer/typography
font-weight: $mktg-header-weight-default !important;
letter-spacing: $mktg-header-spacing-default !important;
letter-spacing: $mktg-header-spacing-default;
}

@each $header, $sizes in $mktg-headers {
Expand All @@ -30,7 +30,7 @@
line-height: map-get($pairing-md, 'lh') !important;

@if (map-get($pairing-md, 'size') >= $mktg-header-spacing-threshold and map-get($pairing, 'size') < $mktg-header-spacing-threshold) {
letter-spacing: $mktg-header-spacing-large !important;
letter-spacing: $mktg-header-spacing-large;
}

@if (map-get($pairing-md, 'size') >= $mktg-header-weight-threshold and map-get($pairing, 'size') < $mktg-header-weight-threshold) {
Expand All @@ -45,7 +45,7 @@
line-height: map-get($pairing-lg, 'lh') !important;

@if (map-get($pairing-lg, 'size') >= $mktg-header-spacing-threshold and map-get($pairing-md, 'size') < $mktg-header-spacing-threshold) {
letter-spacing: $mktg-header-spacing-large !important;
letter-spacing: $mktg-header-spacing-large;
}

@if (map-get($pairing-lg, 'size') >= $mktg-header-weight-threshold and map-get($pairing-md, 'size') < $mktg-header-weight-threshold) {
Expand Down Expand Up @@ -77,7 +77,7 @@
font-size: map-get($pairing, 'size') !important;
line-height: map-get($pairing, 'lh') !important;

@if (map-get($pairing, 'size') >= $mktg-body-spacing-threshold) { letter-spacing: $mktg-body-spacing-large !important; }
@if (map-get($pairing, 'size') >= $mktg-body-spacing-threshold) { letter-spacing: $mktg-body-spacing-large; }

@if (map-get($pairing, 'size') >= $mktg-body-weight-threshold) { font-weight: $font-weight-semibold; }

Expand All @@ -87,7 +87,7 @@
line-height: map-get($pairing-md, 'lh') !important;

@if (map-get($pairing-md, 'size') >= $mktg-body-spacing-threshold and map-get($pairing, 'size') < $mktg-body-spacing-threshold) {
letter-spacing: $mktg-body-spacing-large !important;
letter-spacing: $mktg-body-spacing-large;
}

@if (map-get($pairing-md, 'size') >= $mktg-body-weight-threshold and map-get($pairing, 'size') < $mktg-body-weight-threshold) {
Expand All @@ -102,7 +102,7 @@
line-height: map-get($pairing-lg, 'lh') !important;

@if (map-get($pairing-lg, 'size') >= $mktg-body-spacing-threshold and map-get($pairing-md, 'size') < $mktg-body-spacing-threshold) {
letter-spacing: $mktg-body-spacing-large !important;
letter-spacing: $mktg-body-spacing-large;
}

@if (map-get($pairing-lg, 'size') >= $mktg-body-weight-threshold and map-get($pairing-md, 'size') < $mktg-body-weight-threshold) {
Expand Down

0 comments on commit 2eabfde

Please sign in to comment.