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.
This commit is contained in:
Les Leslie 2018-10-28 15:12:52 -07:00 committed by Jeremy Thomas
parent 3c096d05bd
commit 50fb74d6c8
3 changed files with 62 additions and 1 deletions

View File

@ -396,7 +396,7 @@ breadcrumb:
<tbody> <tbody>
<tr> <tr>
<td><code>has-text-weight-light</code></td> <td><code>has-text-weight-light</code></td>
<td>Transforms text weight to <strong>light</strong></td> <td>Transforms text weight to <strong>light</strong></td>
</tr> </tr>
<tr> <tr>
<td><code>has-text-weight-normal</code></td> <td><code>has-text-weight-normal</code></td>
@ -412,3 +412,48 @@ breadcrumb:
</tr> </tr>
</tbody> </tbody>
</table> </table>
{% include elements/anchor.html name="Font family" %}
<div class="content">
<p>
You can change the font family with the use of one of <strong>5 font family
helpers</strong>:
</p>
</div>
<table class="table is-bordered">
<thead>
<tr>
<th>
Class
</th>
<th>
Family
</th>
</tr>
</thead>
<tbody>
<tr>
<td><code>is-family-primary</code></td>
<td>Changes font family to <strong>$family-primary</strong></td>
</tr>
<tr>
<td><code>is-family-secondary</code></td>
<td>Changes font family to <strong>$family-secondary</strong></td>
</tr>
<tr>
<td><code>is-family-sans-serif</code></td>
<td>Changes font family to <strong>$family-sans-serif</strong></td>
</tr>
<tr>
<td><code>is-family-monospace</code></td>
<td>Changes font family to <strong>$family-monospace</strong></td>
</tr>
<tr>
<td><code>is-family-code</code></td>
<td>Changes font family to <strong>$family-code</strong></td>
</tr>
</tbody>
</table>

View File

@ -120,6 +120,21 @@ $alignments: ('centered': 'center', 'justified': 'justify', 'left': 'left', 'rig
.has-text-weight-bold .has-text-weight-bold
font-weight: $weight-bold !important 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 // Visibility
$displays: 'block' 'flex' 'inline' 'inline-block' 'inline-flex' $displays: 'block' 'flex' 'inline' 'inline-block' 'inline-flex'

View File

@ -67,6 +67,7 @@ $link-active-border: $grey-dark !default
// Typography // Typography
$family-primary: $family-sans-serif !default $family-primary: $family-sans-serif !default
$family-secondary: $family-sans-serif !default
$family-code: $family-monospace !default $family-code: $family-monospace !default
$size-small: $size-7 !default $size-small: $size-7 !default