Skip to content

Commit

Permalink
refactor: added longest font name as well (#558)
Browse files Browse the repository at this point in the history
  • Loading branch information
mfranzke authored Aug 23, 2023
1 parent 521002b commit 5801ea7
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions source/_patterns/00-base/type/_fonts.scss
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
font-weight: $font-weight;
@if $font-local-name and $font-local-name-short {
src:
local("#{$font-name}"),
local("#{$font-local-name}"),
local("#{$font-local-name-short}"),
url("#{$fonts-path}#{$font-filename}.woff2?4r0080")
Expand All @@ -23,20 +24,23 @@
format("woff");
} @else if $font-local-name {
src:
local("#{$font-name}"),
local("#{$font-local-name}"),
url("#{$fonts-path}#{$font-filename}.woff2?4r0080")
format("woff2"),
url("#{$fonts-path}#{$font-filename}.woff?4r0080")
format("woff");
} @else if $font-local-name-short {
src:
local("#{$font-name}"),
local("#{$font-local-name-short}"),
url("#{$fonts-path}#{$font-filename}.woff2?4r0080")
format("woff2"),
url("#{$fonts-path}#{$font-filename}.woff?4r0080")
format("woff");
} @else {
src:
local("#{$font-name}"),
url("#{$fonts-path}#{$font-filename}.woff2?4r0080")
format("woff2"),
url("#{$fonts-path}#{$font-filename}.woff?4r0080")
Expand Down

0 comments on commit 5801ea7

Please sign in to comment.