Skip to content

Commit

Permalink
font mixing bugfix
Browse files Browse the repository at this point in the history
  • Loading branch information
Black Mirror committed Mar 15, 2018
1 parent 71e3fe7 commit 843d694
Showing 1 changed file with 15 additions and 10 deletions.
25 changes: 15 additions & 10 deletions scss/mixins/_text.scss
Original file line number Diff line number Diff line change
Expand Up @@ -74,12 +74,15 @@ $line-height-modes: array-concat((normal), $css-default-modes);

$font-family: map-get($settings, family);

@if is-string($font-family) {
font-family: #{$font-family}, Arial, sans-serif;
}
@else {
@warn '`font-family: #{$font-family}` is not a valid font-family value';
@if is-defined($font-family) {
@if is-string($font-family) {
font-family: #{$font-family}, Arial, sans-serif;
}
@else {
@warn '`font-family: #{$font-family}` is not a valid font-family value';
}
}

$font-weight: map-get($settings, weight);

@if is-font-weight($font-weight) {
Expand All @@ -91,11 +94,13 @@ $line-height-modes: array-concat((normal), $css-default-modes);

$font-color: map-get($settings, color);

@if is-css-color($font-color) {
color: $font-color;
}
@else {
@warn '`color: #{$font-color}` is not a valid css color';
@if is-defined($font-color) {
@if is-css-color($font-color) {
color: $font-color;
}
@else {
@warn '`color: #{$font-color}` is not a valid css color';
}
}
}

Expand Down

0 comments on commit 843d694

Please sign in to comment.