Functions and Mixins
Usage: @include font-setting('secondary')
Param | Default | Description |
---|---|---|
$type |
'primary' | Version of font-setting. Options: primary | secondary |
@include underlined-link
Param | Default | Description |
---|---|---|
$hover-only |
false | Whether this is a subtle or default variation. Options: true | false |
String replace for class names just like in JS. Used to rename map variables. Stolen from CSS Tricks.
Param | Default | Description |
---|---|---|
$string |
'' | {String} Initial string (required) |
$search |
'' | {String} Substring to replace (required) |
$replace |
'' | {String} New value |
Convert pixels to rem. EX: px-to-rem(16px)
Param | Default | Description |
---|---|---|
$pixel-size |
'' | {String} Pixel value to convert (required) |
$context |
$font-root | {String} Substring to replace (defaults to $font-root) |
@include underlined-link-parent
Param | Default | Description |
---|---|---|
$hover-only |
false | Whether or not this a subtle or default variation. Options: true | false |
This is to account for the eminent deprecation of grid-gap
. Some browsers honor gap
, while others are living in the past with grid-gap
. This keeps us working for both names. Eventually, we can remove this mixin in favor of just using gap. The new gap
naming is introduced on Chrome 68+, Safari 11.2, Firefox 61+, and Edge 16+
Example: .my-grid { @include gap($size-m) }
Param | Default | Description |
---|---|---|
$size |
$size-b | Size of gap |
This is to account for the eminent deprecation of [grid-row-gap
]
Param | Default | Description |
---|---|---|
$size |
$size-b | Size of gap |
This is to account for the eminent deprecation of [grid-column-gap
]
Param | Default | Description |
---|---|---|
$size |
$size-b | Size of gap |
Generate color helper classes based on a map
$my-map: ('purple': rebeccapurple, 'blue': dodgerblue)
@include($my-map, 'bg')
Param | Default | Description |
---|---|---|
$color-map |
'' | A sass map variable (required) |
$type |
'' | Either 'bg', 'text' or 'text-hover' (required) |
@include mq($from: bp-l)
Param | Default | Description |
---|---|---|
$from |
false | {String | Boolean} One of $mq-breakpoints |
$until |
false | {String | Boolean} One of $mq-breakpoints |
$and |
false | {String | Boolean} Additional media query parameters |
$media-type |
{String} ($mq-media-type) Media type: screen, print… |