From: Les Leslie Date: Sun, 28 Oct 2018 22:12:52 +0000 (-0700) Subject: Add $family-secondary, $family-tertiary, and 6 font family helpers (#2178) X-Git-Tag: 0.7.3~41 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=50fb74d6c8e74772a5a31e94457bbf35462a092f;p=thirdparty%2Fbulma.git Add $family-secondary, $family-tertiary, and 6 font family helpers (#2178) * Add secondary and tertiary font families to derived-variables.sass * Add font family helpers to helpers.sass * Add has-font-* to typography-helpers.html * Correct number of font family helpers in typography-helpers.html * Remove $family-tertiary, change has-font to is-family, and update docs. --- diff --git a/docs/documentation/modifiers/typography-helpers.html b/docs/documentation/modifiers/typography-helpers.html index 1d5d9ffb7..e29985ed8 100644 --- a/docs/documentation/modifiers/typography-helpers.html +++ b/docs/documentation/modifiers/typography-helpers.html @@ -396,7 +396,7 @@ breadcrumb: has-text-weight-light - Transforms text weight to light + Transforms text weight to light has-text-weight-normal @@ -412,3 +412,48 @@ breadcrumb: + +{% include elements/anchor.html name="Font family" %} + +
+

+ You can change the font family with the use of one of 5 font family + helpers: +

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ Class + + Family +
is-family-primaryChanges font family to $family-primary
is-family-secondaryChanges font family to $family-secondary
is-family-sans-serifChanges font family to $family-sans-serif
is-family-monospaceChanges font family to $family-monospace
is-family-codeChanges font family to $family-code
+ diff --git a/sass/base/helpers.sass b/sass/base/helpers.sass index 10c9056ea..17fdf15ac 100644 --- a/sass/base/helpers.sass +++ b/sass/base/helpers.sass @@ -120,6 +120,21 @@ $alignments: ('centered': 'center', 'justified': 'justify', 'left': 'left', 'rig .has-text-weight-bold font-weight: $weight-bold !important +.is-family-primary + font-family: $family-primary !important + +.is-family-secondary + font-family: $family-secondary !important + +.is-family-sans-serif + font-family: $family-sans-serif !important + +.is-family-monospace + font-family: $family-monospace !important + +.is-family-code + font-family: $family-code !important + // Visibility $displays: 'block' 'flex' 'inline' 'inline-block' 'inline-flex' diff --git a/sass/utilities/derived-variables.sass b/sass/utilities/derived-variables.sass index aa912813a..c464814af 100644 --- a/sass/utilities/derived-variables.sass +++ b/sass/utilities/derived-variables.sass @@ -67,6 +67,7 @@ $link-active-border: $grey-dark !default // Typography $family-primary: $family-sans-serif !default +$family-secondary: $family-sans-serif !default $family-code: $family-monospace !default $size-small: $size-7 !default