Permalink
Browse files

Revert "Local Italic Fonts are Not Being Loaded #2451"

This reverts commit 1736cfb.
  • Loading branch information...
simmonsr committed Feb 4, 2019
1 parent 1736cfb commit 971373016a57979b488de98a9b759e374e16c757
@@ -1,4 +1,3 @@
@import "direction";
@import "range";
@import "replace";
@import "utilities";

This file was deleted.

Oops, something went wrong.
@@ -1,25 +1,19 @@
// Font Import
@mixin import-font($font-list) {
// Import once Google fonts.
$url: get-font-url($font-list);
@if $url {
@import $url;
}
// Import once all local fonts in the list.
@each $font in get-local-fonts($font-list) {
@each $weight in get-local-font-weights($font) {
$url: get-local-font-url($font, $weight);
$style: '';
@if (str-index($weight, 'italic')) {
$style: 'italic';
} @else {
$style: 'normal';
}
@if $url {
@include font-face($font, $url, str-replace($weight, 'italic', ''), unquote($style));
}
}
}
// Import once Google fonts.
$url: get-font-url($font-list);
@if $url {
@import $url;
}
// Import once all local fonts in the list.
@each $font in get-local-fonts($font-list) {
@each $weight in get-local-font-weights($font) {
$url: get-local-font-url($font, $weight);
@if $url {
@include font-face($font, $url, $weight);
}
}
}
}

// Responsive Font Mixin
@@ -199,7 +199,7 @@ public function userGetLocalFontWeights($args)
// Create a list of numbers so that SCSS parser can parse the list.
$list = [];
foreach ($weights as $weight) {
$list[] = ['string', '', [$weight]];
$list[] = ['string', '', [(int) $weight]];
}
return ['list', ',', $list];

0 comments on commit 9713730

Please sign in to comment.