From 68d5abe11ca752a4403f6f4d681fcc15d1d443e3 Mon Sep 17 00:00:00 2001 From: rayelliott Date: Fri, 8 May 2020 10:09:13 +0000 Subject: [PATCH] add font mixins --- sass/mixins/_mixins-master.scss | 65 ++++++++++++++++++++------------- 1 file changed, 40 insertions(+), 25 deletions(-) diff --git a/sass/mixins/_mixins-master.scss b/sass/mixins/_mixins-master.scss index 20f1fe80..6ff30029 100644 --- a/sass/mixins/_mixins-master.scss +++ b/sass/mixins/_mixins-master.scss @@ -1,50 +1,65 @@ @mixin font-1($weight) { - // see functions.php->google_fonts() - // and functions.php->_s_scripts() - font-family: "Montserrat", -apple-system, BlinkMacSystemFont, "Segoe UI", - Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif; - @if $weight == regular { - font-weight: 400; - } @else if $weight == bold { - font-weight: 600; - } @else if $weight == extra-bold { - font-weight: 700; - } @else { - @error "font-weight #{$weight} not in valid font-weights for font-1: 'Montserrat'."; - } + // see functions.php->google_fonts() + // and functions.php->_s_scripts() + font-family: + Montserrat, + -apple-system, + BlinkMacSystemFont, + "Segoe UI", + Roboto, + Oxygen-Sans, + Ubuntu, + Cantarell, + "Helvetica Neue", + sans-serif; + + @if $weight == regular { + font-weight: 400; + } @else if $weight == bold { + font-weight: 600; + } @else if $weight == extra-bold { + font-weight: 700; + } @else { + + @error "font-weight #{$weight} not in valid font-weights for font-1: 'Montserrat'."; + } } @mixin font-body($weight: regular) { - @include font-1($weight); + + @include font-1($weight); } @mixin font-title($weight: regular) { - @include font-1($weight); + + @include font-1($weight); } @mixin font-link($weight: regular) { - @include font-1($weight); + + @include font-1($weight); } @mixin font-code($weight: regular) { - font-family: $font-code; - font-weight: $weight; + font-family: $font__code; + font-weight: $weight; } @mixin font-pre($weight: regular) { - font-family: $font-pre; - font-weight: $weight; + font-family: $font__pre; + font-weight: $weight; } // Center block @mixin center-block { - display: block; - margin-left: auto; - margin-right: auto; + display: block; + margin-left: auto; + margin-right: auto; } // Column width with margin @mixin column-width($numberColumns: 3) { - width: map-get($columns, $numberColumns) - - (($columns__margin * ($numberColumns - 1)) / $numberColumns); + width: + map-get($columns, $numberColumns) - + (($columns__margin * ($numberColumns - 1)) / $numberColumns); }