Mixins
font-size
font-size
@mixin font-size (...) { ... }
Parameters
parameter Name | parameter Description | parameter Type | parameter Default value |
---|---|---|---|
$scale |
{Integer|Name} The integer ratio or named font-size. |
|
— |
$important |
{Boolean} Whether to add an important declaration to the CSS rules. |
|
— |
font
font
@mixin font (...) { ... }
Parameters
parameter Name | parameter Description | parameter Type | parameter Default value |
---|---|---|---|
$scale |
{Integer|Name} The integer ratio or named font-size. |
|
— |
$important |
{Boolean} Whether to add an important declaration to the CSS rules. |
|
— |
Selectors
Function
font-family
font-family
@function font-family (...) { ... }
Parameters
parameter Name | parameter Description | parameter Type | parameter Default value |
---|---|---|---|
$stack |
The stack name e.g. sans, serif or mono |
String
|
— |
get-scale-integer
get-scale-integer
@function get-scale-integer (...) { ... }
Parameters
parameter Name | parameter Description | parameter Type | parameter Default value |
---|---|---|---|
$scale |
{Integer|Name} The integer ratio or named font-size. |
|
— |
get-font-size
get-font-size
@function get-font-size (...) { ... }
Parameters
parameter Name | parameter Description | parameter Type | parameter Default value |
---|---|---|---|
$scale |
{Integer|Name} The integer ratio or named font-size. |
|
— |
get-line-height
get-line-height
@function get-line-height (...) { ... }
Parameters
parameter Name | parameter Description | parameter Type | parameter Default value |
---|---|---|---|
$scale |
{Integer|Name} The integer ratio or named font-size. |
|
— |
Placeholders
Variables
$named-font-sizes
named-font-sizes
$named-font-sizes: (
h1: 7,
h2: 6,
h3: 5,
h4: 4,
h5: 3,
h6: 2,
lead: 1,
p: 0
);
Map structure
key Name | key Description | key Type | key Value |
---|---|---|---|
h1
|
Heading 1 |
Integer
|
6
|
h2
|
Heading 2 |
Integer
|
5
|
h3
|
Heading 3 |
Integer
|
4
|
h4
|
Heading 4 |
Integer
|
3
|
h5
|
Heading 5 |
Integer
|
2
|
h6
|
Heading 6 |
Integer
|
1
|
p
|
Paragraph |
Integer
|
0
|
$font-sizes
font-sizes
$font-sizes: (
// sass-lint:disable-block space-around-operator
-2: (
fs: 12,
lh: 4 * 4,
fw: 400,
mb: $spacing-small,
mt: $spacing-small
),
-1: (
fs: 14,
lh: 4 * 5,
fw: 400,
mb: $spacing-medium,
mt: $spacing-medium
),
// Paragraphs
0: (
fs: 4 * 4,
lh: 4 * 6,
fw: 400,
mb: $spacing-medium,
mt: $spacing-medium
),
// Lead
1: (
fs: 4 * 5,
lh: 4 * 7,
fw: 400,
mb: $spacing-medium,
mt: $spacing-medium
),
// h6
2: (
fs: 4 * 4,
lh: 4 * 5,
fw: 700,
mb: $spacing-medium,
mt: $spacing-medium
),
// h5
3: (
fs: 4 * 5,
lh: 4 * 6,
fw: 700,
mb: $spacing-medium,
mt: $spacing-medium
),
// h4
4: (
fs: 4 * 6,
lh: 4 * 7,
fw: 700,
mb: $spacing-medium,
mt: $spacing-medium
),
// h3
5: (
fs: 4 * 7,
lh: 4 * 8,
fw: 700,
mb: $spacing-medium,
mt: $spacing-large
),
// h2
6: (
fs: 4 * 8,
lh: 4 * 10,
fw: 700,
mb: $spacing-medium,
mt: $spacing-large
),
// h1
7: (
fs: 4 * 11,
lh: 4 * 12,
fw: 900,
mb: $spacing-medium,
mt: 0,
)
);