Configuration

variables

rem-px-fallback

$rem-px-fallback: false !default;
View source

Description

Determines whether rems() conversion includes a pixel-value fallback for older browsers like IE8.

Used by

base-font-size

$base-font-size: 16px !default;
View source

Description

Font size all other values will use for calculation. Will be converted to rems.

Used by

base-line-height

$base-line-height: 24px !default;
View source

Description

Line-height for base font-size. Essentially determines the baseline grid for alignment.

Used by

See

auto-line-height-looseness (aliased as font-looseness )

$auto-line-height-looseness: 15% !default;
View source

Description

A rough estimate of how loose line-heights should be calculated against their font-sizes (when automatically generated).

Used by

type-h1-size

$type-h1-size: modular-scale(7) !default;
View source

Type

List or Number - should be pixel values. a single value is the font-size, while a secondary (optional) value is the line-height.

Used by

type-h2-size

$type-h2-size: modular-scale(5) !default;
View source

Type

List or Number - should be pixel values. a single value is the font-size, while a secondary (optional) value is the line-height.

Used by

type-h3-size

$type-h3-size: modular-scale(4) !default;
View source

Type

List or Number - should be pixel values. a single value is the font-size, while a secondary (optional) value is the line-height.

Used by

type-h4-size

$type-h4-size: modular-scale(3) !default;
View source

Type

List or Number - should be pixel values. a single value is the font-size, while a secondary (optional) value is the line-height.

Used by

type-h5-size

$type-h5-size: modular-scale(2) !default;
View source

Type

List or Number - should be pixel values. a single value is the font-size, while a secondary (optional) value is the line-height.

Used by

type-h6-size

$type-h6-size: modular-scale(1) !default;
View source

Type

List or Number - should be pixel values. a single value is the font-size, while a secondary (optional) value is the line-height.

Used by

type-p-size

$type-p-size: ($base-font-size, $base-line-height) !default;
View source

Type

List or Number - should be pixel values. a single value is the font-size, while a secondary (optional) value is the line-height.

Used by

type-small-size

$type-small-size: modular-scale(-1) !default;
View source

Type

List or Number - should be pixel values. a single value is the font-size, while a secondary (optional) value is the line-height.

Used by

primary-font-stack

$primary-font-stack: $system-font-stack !default;
View source

Description

Reference for the project's main font-stack.

monospace-font-stack

$monospace-font-stack: 'SFMono-Regular', 'SF Mono', 'Ubuntu Mono', Consolas,
    'DejaVu Sans Mono', Menlo, monospace !default;
View source

Description

Reference for the project's monospaced font-stack.

web-fonts (aliased as include-web-fonts )

$web-fonts: (
    'system': (
        'weights': (
            400,
            700,
        ),
        'italics': (
            400,
            700,
        ),
        'formats': (
            'woff',
        ),
    ),
) !default;
View source

Description

Description of weights, styles and formats for the project's web fonts. The root key value determines the name, while each inner key determines the weights, styles, and formats.

Type

Map

Map structure

map key Namemap key Descriptionmap key Typemap key Value
font-name

name of the font family

Map none
font-name.weights

font-weights to include

List</code> or <code>Number none
font-name.italics

include italics for weights

List</code> or <code>Number none
font-name.formats

file formats to include

List</code> or <code>String none

web-fonts-path (aliased as font-file-location )

$web-fonts-path: '' !default;
View source

Description

Relative path to fonts from CSS file

Type

String

Used by

vertical-space

$vertical-space: $base-line-height !default;
View source

Description

The base vertical unit. Used in type-space and grid functions.

Used by

See

horizontal-space

$horizontal-space: $base-line-height !default;
View source

Description

The base horizontal unit. Used in type-space and grid functions.

Used by

See

auto-scale-type

$auto-scale-type: false !default;
View source

Description

Automatically scale type values?

Type

Boolean

Used by

auto-scale-type-ratio (aliased as scale-ratio )

$auto-scale-type-ratio: 1.125 !default;
View source

Description

Modular scale ratio

Type

Number

Used by

spacing-classes (aliased as spacing-utilities-init )

$spacing-classes: (
    silent: true,
    important: false,
    format: (
        'u-{%property%}' '{%direction%}{%amount%}' '{\\@}{%breakpoint%}',
    ),
    properties: (
        'margin': margin,
    ),
    directions: (
        '': '',
    ),
    amounts: (
        '': 1,
    ),
    unit: 'auto',
) !default;
View source

Description

Utility spacing class configuration.

Type

Map

Map structure

map key Namemap key Descriptionmap key Typemap key Value
$config noneMap()
$config.silent

Output silent classes?

Booleantrue
$config.important

Make declarations important?

Booleanfalse
$config.format

Class formatting. Accepts property, direction, amount, and breakpoint. See format-class-name for more information.

String none
$config.directions

Names and directions to append to class names.

Map('-t': 'top')
$config.amounts

Names and values to multiply by each unit.

Map('-2': 2)
$config.properties

Names for each property.

Map('m': margin)
$config.unit

What unit to multiply each 'amounts'. Passed directly to type-space.

Boolean'auto'

Requires

display-classes (aliased as display-utilities-init )

$display-classes: $_default-display-classes !default;
View source

Description

A description of class names and their associated display value. Used for generating utility classes via display-classes mixin.

Type

Map

Used by

debug-fonts

$debug-fonts: false !default;
View source

Description

Whether to show console outputs of line-heights that are automatically calculated.

Used by

debug-silent-classes

$debug-silent-classes: false !default;
View source

Description

Stores all auto-generated silent classes into a map that is then output as a comment at the end of the final css. Useful for getting an overview of values that are stored by the framework.

Used by

max-site-width

$max-site-width: 1360px !default;
View source

Used by

max-content-width

$max-content-width: 690px !default;
View source

max-wide-content-width

$max-wide-content-width: 910px !default;
View source

breakpoints

$breakpoints: (
    // Mostly phones
        smalls: '(max-width:#{($max-wide-content-width/16px)}em)',
    // Small Phones
        small: '(max-width: #{($max-content-width/16px)}em)',
    // Large (Modern) phones/phablets
        smallish: '(min-width: #{(($max-content-width + 1)/16px)}em)' +
        ' and (max-width: #{($max-wide-content-width/16px)}em)',
    // Tablets, Desktops and larger
        bigs: '(min-width: #{($max-wide-content-width/16px)}em)',
    // Mostly Tablets and small laptops. Overrides Bigs
        lap: '(min-width: #{($max-wide-content-width/16px)}em)' +
        ' and (max-width: #{($max-site-width/16px)}em)',
    // Large Tablets and Desktops. Overrides Bigs.
        desk: '(min-width: #{($max-site-width/16px)}em)'
) !default;
View source

Description

Breakpoint strings to use with media-query mixin.

Used by

See

grid-columns

$grid-columns: 12 !default;
View source

Description

Total columns to base your grid on.

Used by

grid-gutter

$grid-gutter: 32px !default;
View source

Description

Space between grid items.

grid-bem-naming

$grid-bem-naming: false !default;
View source

Description

Use BEM-style naming for grid classes?

grid-silent-classes

$grid-silent-classes: false !default;
View source

Description

Generate silent classes for the grid?

grid-flex

$grid-flex: true !default;
View source

Description

Use a flex-based grid?

Used by

grid-inline-block

$grid-inline-block: true !default;
View source

Description

Use an inline-block-based grid? Can be used in conjunction with flex as a fallback.

Used by

grid-floats

$grid-floats: false !default;
View source

Description

Use a float-based grid?

Used by

grid-letter-space-fix

$grid-letter-space-fix: -0.45em !default;
View source

Description

With inline-block-based grids, we need to "fix" the space between items with a negative letter-spacing value. This value might change based on your project's base font.

grid-push

$grid-push: true !default;
View source

Description

Include push grid classes?

Used by

grid-pull

$grid-pull: true !default;
View source

Description

Include pull grid classes?

Used by

grid-width-namespace

$grid-width-namespace: if($grid-bem-naming, 'w-', '') !default;
View source

Description

String to include before grid width classes.

breakpoint-has-widths

$breakpoint-has-widths: ('smalls', 'small', 'bigs', 'lap', 'desk') !default;
View source

Description

List of media-queries (as defined in $breakpoints) that should have width utility classes.

Type

List

Used by

breakpoint-has-push

$breakpoint-has-push: ('smalls', 'small', 'bigs', 'lap', 'desk') !default;
View source

Description

List of media-queries (as defined in $breakpoints) that should have grid-push utility classes.

Type

List

Used by

breakpoint-has-pull

$breakpoint-has-pull: ('smalls', 'small', 'bigs', 'lap', 'desk') !default;
View source

Description

List of media-queries (as defined in $breakpoints) that should have grid-pull utility classes.

Type

List

Used by

base-colors

$base-colors: (
    'type': (
        'base': #0a1c2b,
    ),
    'links': #0d497b,
    'bg': #f6f8fb,
) !default;
View source

Description

Index of all colors used in the project. This is the one place colors should be used from. Accessing them should be done via the colors function. Note: 'type', 'links', and 'bg' must be defined.

Used by

See

Core API

variables

system-font-stack

$system-font-stack: -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui,
    Roboto, 'Helvetica Neue', sans-serif;
View source

Description

Font-stack for using the user's operating system's native font.

type-base-unit

$type-base-unit: $base-line-height !global;
View source

Description

Abstraction of the base spacing unit used in any mixin or function that defines spacing units.

Type

Number

Used by

type-base-ratio

$type-base-ratio: ($type-base-unit / $base-font-size) !global;
View source

Description

Ratio used to calculate the difference between font sizes and spacing units.

Type

Number

Used by

h1-fs

$h1-fs: nth($type-h1-size, 1) !global;
View source

Description

H1 font-size

Used by

h1-lh (aliased as type-h1-lh )

$h1-lh: _extract-line-height($type-h1-size) !global;
View source

Description

H1 line-height

Used by

h2-fs

$h2-fs: nth($type-h2-size, 1) !global;
View source

Description

H2 font-size

Used by

h2-lh (aliased as type-h2-lh )

$h2-lh: _extract-line-height($type-h2-size) !global;
View source

Description

H2 line-height

Used by

h3-fs

$h3-fs: nth($type-h3-size, 1) !global;
View source

Description

H3 font-size

Used by

h3-lh (aliased as type-h3-lh )

$h3-lh: _extract-line-height($type-h3-size) !global;
View source

Description

h3 line-height

Used by

h4-fs

$h4-fs: nth($type-h4-size, 1) !global;
View source

Description

H4 font-size

Used by

h4-lh (aliased as type-h4-lh )

$h4-lh: _extract-line-height($type-h4-size) !global;
View source

Description

h4 line-height

Used by

h5-fs

$h5-fs: nth($type-h5-size, 1) !global;
View source

Description

H5 font-size

Used by

h5-lh (aliased as type-h5-lh )

$h5-lh: _extract-line-height($type-h5-size) !global;
View source

Description

h5 line-height

Used by

h6-lh (aliased as type-h6-lh )

$h6-lh: _extract-line-height($type-h6-size) !global;
View source

Description

h6 line-height

Used by

p-fs

$p-fs: nth($type-p-size, 1) !global;
View source

Description

paragraph font-size

Used by

p-lh (aliased as type-p-lh )

$p-lh: _extract-line-height($type-p-size) !global;
View source

Description

paragraph line-height

Used by

small-fs

$small-fs: nth($type-small-size, 1) !global;
View source

Description

small font-size

Used by

small-lh (aliased as type-small-lh )

$small-lh: _extract-line-height($type-small-size) !global;
View source

Description

small line-height

Used by

mixins

font-size (aliased as type-font-size fs )

@mixin font-size($font-size, $line-height: 'auto', $important: false, $base-font: $base-font-size) { ... }
View source

Description

Quickly generate a font-size in rems (with a pixel fallback if $rem-px-fallback = true). Optionally calculates baseline-aligned line-height a using $base-line-height and the baseline-calc function.

Parameters

parameter Nameparameter Descriptionparameter Typeparameter Default value
$font-size

Pixel value to be converted.

Pixel none
$line-height
  • 'auto' or true will automatically create a line-height that is aligned to the $base-line-height.
  • Pixel values will be converted to a unitless value.
  • Unitless numbers will be passed straight through.
  • false will result in no line-height declaration.
Boolean or String or Number'auto'
$important

Whether to add !important after the font-size.

Booleanfalse
$base-font nonePixel$base-font-size

Requires

Used by

type-space (aliased as space )

@mixin type-space($property, $multipliers, $important: false) { ... }
View source

Description

Output rem values using the typographic grid. This is the prefered method of adding padding and margins because it enforces consistent spacing around all elements.

Parameters

parameter Nameparameter Descriptionparameter Typeparameter Default value
$property

Can be any CSS property that accepts a length value (e.g. rem). Also accepts multiple properties as a nested list (e.g. (padding-left, padding-right)).

Property none
$multipliers

Accepts unitless values that get converted to rem units which are a multiple of the typographic grid. Can be multiple values, separated by spaces, in the case of margin or padding. 'auto' is also an acceptable value.

List or Number none
$important

'!important' is allowed as well as true or false.

Boolean or Stringfalse

Example

// SCSS input
.foo {
    @include type-space(padding, 1 .25 .5 auto, '!important');
}

// CSS output
.foo {
    padding: 24px 8px 12px auto !important;
    padding: 1.5rem .375rem .75rem auto !important;
}

Requires

Used by

See

web-fonts

@mixin web-fonts($font-map: $web-fonts) { ... }
View source

Description

A wrapper function for @font-face(). Takes a configuration map and passes the keys to @font-face(). Loops through each font-name's (root map keys) weight and style.

Font file names must be the same as their CSS font-family values. Example: arial font, 400 weight would be arial-400.ttf and the CSS value would be font-family: 'arial'; font-weight: 400.

Parameters

parameter Nameparameter Descriptionparameter Typeparameter Default value
$font-map noneMap$web-fonts

Requires

Used by

See

px-to-rems

@mixin px-to-rems($property, $sizes, $important: false, $base-font: $base-font-size) { ... }
View source

Description

Takes a pixel value and creates a property with a rem value. If $rem-px-fallback is true, a pixel fallback is also included.

Parameters

parameter Nameparameter Descriptionparameter Typeparameter Default value
$property

CSS property value to output

Property none
$sizes

Pixel value(s) to be converted. A list results in a each value being processed. Can also be 'auto' or 'normal' (which avoid conversion).

List or Pixel none
$important

Whether to add !important to the end of the output.

Booleanfalse
$base-font

The base value at which the pixels should be calculated against. Usually not necessary to change.

Pixel$base-font-size

Requires

Used by

spacing-classes

@mixin spacing-classes($breakpoints: $_all-breakpoints, $config: $spacing-classes) { ... }
View source

Description

The responsive component to _output-spacing-classes. Invokes spacing-utilites that loops through a set of media-queries defined in $breakpoints. This is most useful for creating responsive spacing classes.

Parameters

parameter Nameparameter Descriptionparameter Typeparameter Default value
$breakpoints

breakpoints to loop over.

Map$_all-breakpoints
$config

Passed to _output-spacing-classes mixin.

Map$spacing-classes

Requires

Used by

create-overrides

@mixin create-overrides($map, $breakpoints, $namespace: "", $separator: $breakpoint-namespace-character) { ... }
View source

Description

Takes a map of class names and style properties and outputs utility (override) classes over a specified number of breakpoints. Useful for creating a number of single-use classes over multiple breakpoints. Always makes property declarations !important.

Parameters

parameter Nameparameter Descriptionparameter Typeparameter Default value
$map

map of class names, properties and their values.

Map none
$breakpoints

List of breakpoints to create classes for.

List none
$namespace

Value to put before each class.

String""
$separator

string to place between breakpoint names and the classes.

String$breakpoint-namespace-character

Example

@include creat-overrides(
    (
        "class-name": (
            "property": "value",
        ),
        "float-right, align_right": (
            "float": "right"
        )
    ),
    ('smalls', 'bigs')
);

//CSS output
.float-left {
    float: left !important;
 }
.float-right, .align_right {
    float: right !important;
}
@media (max-width: 600px) { // "smalls"
    .smalls-float-left {
        float: left !important;
    }
    .smalls-float-right, .smalls-align_right {
        float: right !important;
    }
}
@media (min-width: 601px) { // "bigs"
    ...
}

Requires

display-classes

@mixin display-classes($breakpoints: $_all-breakpoints, $namespace: '', $silent: false, $important: false) { ... }
View source

Description

The responsive component to _output-display-classes. Invokes _output-display-classes while looping through a set of media-queries defined in $breakpoints. This is most useful for creating responsive display classes.

Parameters

parameter Nameparameter Descriptionparameter Typeparameter Default value
$breakpoints

list of breakpoint names to loop over

List$_all-breakpoints
$namespace

String to prepend to classes.

String''
$silent

Generate silent classes?

Booleanfalse
$important

Add !important to declarations?

Booleanfalse

Requires

Used by

media-query (aliased as media mq breakpoint bp )

@mixin media-query($mq...) { ... }
View source

Description

Enclose a block of code with a media query as named in $breakpoints. To create more consolodated code, most (if not all) media queries should be called through this mixin. Multiple media-queries can be defined, separated by a comma. This will place your content into multiple separate media-queries at once (useful if you need the same css at different breakpoints). Alternative Uses:

  • Passing multiple media queries separated by an 'and' (quoted) to combine them, compiles to something like @media screen and (min-width: 500px) and (max-width: 900px){}.
  • Passing a value like min-width 1200px or max-height 300px allows for arbitrary breakpoints.
  • Passing max 1200px 'and' smalls will create a combined media-query with a predefined one from $$breakpoints.
  • Passing height smalls will replace width with height within the smalls breakpoint. Similarly, using min smalls would replace 'max' with 'min'.

Parameters

parameter Nameparameter Descriptionparameter Typeparameter Default value
$mq...

Can be a reference to a $breakpoints key, a pixel value, or a media value.

List none

Requires

Used by

init (aliased as globalize-config )

@mixin init() { ... }
View source

Description

Important: This must be called in order to use any of the tools. Pulls together config variables and routes them into structures expected by the framework, then makes them global. For instance, the $type-h1-size variable is accepted as a list, but will be available as a single size, while making $type-h1-lh available.

Parameters

None.

Requires

Used by

globalize-config (alias for init)

@mixin globalize-config() { ... }
View source

Refer to init.

interpolate

@mixin interpolate($property, $min-screen, $min-value, $max-screen, $max-value, $easing, $bending-points) { ... }
View source

Description

Generates CSS for interpolated length properties. In other words, it will generate multiple values for a property over multiple media-queries.

It has 5 required parameters, including the target property, initial screen size, initial value, final screen size and final value.

It has two optional parameters which include an easing property, which is a string representation of a CSS animation-timing-function, and finally a number of bending-points that determines how many interpolations steps are applied along the easing function.

Parameters

parameter Nameparameter Descriptionparameter Typeparameter Default value
$property

The CSS property to interpolate

String none
$min-screen

A CSS length unit

Unit none
$min-value

A CSS length unit

Unit none
$max-screen

Value to be parsed

Unit none
$max-value

Value to be parsed

Unit none
$easing

Value to be parsed

String none
$bending-points

Value to be parsed

Number none

Requires

Links

Author

  • Original: Mike Riethmuller, New: Chris Lee

functions

baseline-calc

@function baseline-calc($font-size: $base-font-size, $baseline-slack: $auto-line-height-looseness) { ... }
View source

Description

TL;DR: Automatically calculate the baseline of any particular font-size.

Creates unitless line-heights that align to the baseline grid with consideration to the aesthetics of a given font size. Essentially makes sure larger font-sizes have smaller line-heights, while smaller font-sizes have larger ones. Uses constraints based on upper and lower limits of pleasing line-heights, and finds where a given font-size should sit within those constraints. $baseline-slack increases the upper constraints, allowing for taller line-heights on larger font sizes.

The rate of change from large to small line-height is mostly a logarithmic curve.

Depends on baseline() for calculation and _baseline-curve() to determine the deviance from the upper and lower constraints.

Parameters

parameter Nameparameter Descriptionparameter Typeparameter Default value
$font-size

font-size in need of a baseline

Number$base-font-size
$baseline-slack

Percentage.

Number$auto-line-height-looseness

Returns

Number

Requires

Used by

type-space

@function type-space($multipliers) { ... }
View source

Description

A functional version of the type-space mixin.

Parameters

parameter Nameparameter Descriptionparameter Typeparameter Default value
$multipliers

Accepts unitless values that get converted to rem units which are a multiple of the typographic grid. Can be multiple values, separated by spaces, in the case of margin or padding. 'auto' is also an acceptable value.

List or Number none

Requires

px-to-rems (aliased as rems rems )

@function px-to-rems($pixels) { ... }
View source

Description

Calculates rem values. Used by px-to-rems mixin. The $base-size is used to calculate the value (e.g. if the body's font-size is 16px, then the rem value of 24px would be 1.5rem).

Parameters

parameter Nameparameter Descriptionparameter Typeparameter Default value
$pixels noneNumber none

Used by

px-to-ems (aliased as ems )

@function px-to-ems($pixels, $context: $base-font-size) { ... }
View source

Description

Function for calculating em values. The $context is used to calculate the final value. Different from px-to-rems() by generating a value with an em. $context is often necessary based on the situation.

Parameters

parameter Nameparameter Descriptionparameter Typeparameter Default value
$pixels noneNumber none
$context noneNumber$base-font-size

Used by

format-class-name (aliased as _class format-class-list )

@function format-class-name($string, $values-map, $stringify: false) { ... }
View source

Description

Interpolates lists of strings to generate dynamic class names. Using a specific format (see below) and a set of placeholders provided by functions, a class name can be generated in a more flexible fashion. Will also filter out optional strings if they appear at the beginning or end of a string (such as values between two placeholders). Using lists allows for better caching and creates inherent dependencies between optional characters and their placeholders. For instance, '{%var%}{_}' implies that the _ is dependent on {%var%} (if {%var%} is evaluated to be blank, then _ is also blank).

Format Syntax

  • {%key%} - Variable: Expects to be replaced by a value provided by a map.
  • {_} - Placeholder: Optional spacing value. Will be filtered out if not surrounded by non-blank characters.

Parameters

parameter Nameparameter Descriptionparameter Typeparameter Default value
$string

The string to format.

String none
$values-map

map with keys cooresponding to the variables in the string.

Map none
$stringify

Convert the list to a string before returning?

Booleanfalse

Example

Simple example

$class-format: '.{%breakpoint%}_hidden';
format-class-list($class-format, ('breakpoint': 'small'));
// Out: '.small_hidden'

Complex example with lists and optional values left blank

 $class-format: '.{%breakpoint%}{_}''{%display%}';
 format-class-list(
   $class-format,
   ('display': 'flex', 'breakpoint': '')
 );
// Out: '.flex'

Requires

Used by

_class (alias for format-class-name)

@function _class() { ... }
View source

Refer to format-class-name.

colors (aliased as color clr )

@function colors($color-name, $tone: 'base', $opacity: 1) { ... }
View source

Description

Get a color value from the global $base-colors map. Darker and lighter tones are available by passing a second string.

Parameters

parameter Nameparameter Descriptionparameter Typeparameter Default value
$color-name

The color you

String none
$tone noneString'base'
$opacity noneNumber1

Returns

Color

Example

.foo {
   background-color: colors(links, light));
}

Requires

Used by

See

Links

color (alias for colors)

@function color() { ... }
View source

Refer to colors.

easing

@function easing($easing: 'ease') { ... }
View source

Description

Takes a string representation of an cubic-bezier easing, and returns its 4-digit list value.

Parameters

parameter Nameparameter Descriptionparameter Typeparameter Default value
$easing

Easing name

String'ease'

Requires

Used by

See

cubic-easing (aliased as c-ease )

@function cubic-easing($easing: 'ease') { ... }
View source

Description

Takes a string representation of an cubic-bezier easing, and returns the corresponding cubic-bezier statement.

Parameters

parameter Nameparameter Descriptionparameter Typeparameter Default value
$easing

Easing name

String'ease'

Requires

Used by

See

Grid

functions

grid-size (aliased as columns )

@function grid-size($columns, $context: $grid-columns, $total-columns: $grid-columns) { ... }
View source

Description

Creates a percentage based on the $size / $context while allowing for a contextual calculations (($total/$context) * ($columns/$total)).

For instance, if you have a grid of 12 columns and you've created an item that is 7 columns wide, its children would then be in a 7/12 context. In order to maintain the grid and calculate the width of a child that spans 4 columns, it would have to be 1 quarter of 7/12.

Parameters

parameter Nameparameter Descriptionparameter Typeparameter Default value
$columns

Column span

Number none
$context

Out of how many columns?

Number$grid-columns
$total-columns noneNumber$grid-columns

Returns

Number

percentage

Example

.parent {
   width: grid-size(7, 12);
}
.child {
   width: grid-size(4, 7, 12);
}

Requires

Used by

columns (alias for grid-size)

@function columns() { ... }
View source

Refer to grid-size.

mixins

grid-width (aliased as width )

@mixin grid-width($columns, $total: $grid-columns) { ... }
View source

Description

Creates a width property with a percentage based on the $columns / $total. Also includes flex-based properties if $grid-flex is enabled.

Parameters

parameter Nameparameter Descriptionparameter Typeparameter Default value
$columns

Column span.

Number none
$total noneNumber$grid-columns

Requires

Used by

width (alias for grid-width)

@mixin width() { ... }
View source

Refer to grid-width.

width-setup

@mixin width-setup($silent: $grid-silent-classes, $property: "width", $important: false, $property: "width") { ... }
View source

Description

Uses $_human-readable-numerators and $_human-readable-denominators to create percentages based on $grid-columns. $property accepts any property, as well as lists of properties.

Parameters

parameter Nameparameter Descriptionparameter Typeparameter Default value
$silent

Use silent classes?

Boolean$grid-silent-classes
$property

What property should these widths applied to?

String"width"
$important

Should !important be applied to properties?

Booleanfalse
$property

What property should these widths applied to?

String"width"

Used by

grid-setup (aliased as grid-classes )

@mixin grid-setup($silent: $grid-silent-classes, $gutter: $grid-gutter, $flex: $grid-flex, $inline-block: $grid-inline-block, $floats: $grid-floats, $bem: $grid-bem-naming) { ... }
View source

Description

Generates basic grid classes based on passed in options.

Parameters

parameter Nameparameter Descriptionparameter Typeparameter Default value
$silent

Make all classes silent?

Boolean$grid-silent-classes
$gutter

Gutter size between grid items.

Number$grid-gutter
$flex

Use flexbox?

Boolean$grid-flex
$inline-block

Use inline-block?

Boolean$grid-inline-block
$floats

Use floats?

Boolean$grid-floats
$bem

Use BEM naming? false will result in snake-case names.

Boolean$grid-bem-naming

Used by

grid-row

@mixin grid-row() { ... }
View source

Description

Creates a grid container (row) based on your grid configuration.

Parameters

None.

Requires

grid-item

@mixin grid-item($columns: $grid-columns, $total-columns: $grid-columns) { ... }
View source

Description

Creates a grid item (column) based on your grid configuration set to a width based on the $columns passed in.

Parameters

parameter Nameparameter Descriptionparameter Typeparameter Default value
$columns

Number of columns the item should span.

Number$grid-columns
$total-columns

Number of columns in total grid space. Only necessary to change if you are nesting grids within grids.

Number$grid-columns

Requires

See

grid-init

@mixin grid-init($silent: $grid-silent-classes, $important: false) { ... }
View source

Description

Creates responsive grid classes by running through all the grid-setup mixins. Uses the media-queries defined in the $breakpoint-has- variables to create media-query-scoped classes.

Parameters

parameter Nameparameter Descriptionparameter Typeparameter Default value
$silent

generate silent classes?

Boolean$grid-silent-classes
$important

make them !important?

Booleanfalse

Requires

grid-classes (alias for grid-setup)

@mixin grid-classes() { ... }
View source

Refer to grid-setup.

width-classes

@mixin width-classes($silent: $grid-silent-classes, $important: false) { ... }
View source

Description

Creates responsive width classes (using width-setup mixin). Loops across all breakpoints in $breakpoint-has-widths. Creates classes with width property values (flex-basis and max-width for flex-based grids) based on the grid.

Parameters

parameter Nameparameter Descriptionparameter Typeparameter Default value
$silent

generate silent classes?

Boolean$grid-silent-classes
$important

make them !important?

Booleanfalse

Requires

Used by

push-classes

@mixin push-classes($silent: $grid-silent-classes, $important: false) { ... }
View source

Description

Creates responsive grid-push classes. Loops across all breakpoints in breakpoints in $breakpoint-has-push. Creates classes with left property values based on the grid.

Parameters

parameter Nameparameter Descriptionparameter Typeparameter Default value
$silent

generate silent classes?

Boolean$grid-silent-classes
$important

make them !important?

Booleanfalse

Requires

Used by

pull-classes

@mixin pull-classes($silent: $grid-silent-classes, $important: false) { ... }
View source

Description

Creates responsive grid-pull classes. Loops across all breakpoints in $breakpoint-has-pull. Creates classes with right property values based on the grid.

Parameters

parameter Nameparameter Descriptionparameter Typeparameter Default value
$silent

generate silent classes?

Boolean$grid-silent-classes
$important

make them !important?

Booleanfalse

Requires

Used by

Math

variables

PI

$PI: 3.1415926535897932384626433832795028841971693993751;
View source

E

$E: 2.71828182845904523536028747135266249775724709369995;
View source

LN2

$LN2: 0.6931471805599453;
View source

Used by

SQRT2

$SQRT2: 1.4142135623730951;
View source

Used by

PHI (alias for golden)

$PHI: golden();
View source

Refer to golden.

functions

pow (aliased as exponent )

@function pow($base, $exp) { ... }
View source

Description

A robust exponent multiplication which allows for decimal-based exponents. This fully replaces Compass' pow() function (allows for float-based exponents).

Parameters

parameter Nameparameter Descriptionparameter Typeparameter Default value
$base noneNumber none
$exp noneNumber none

Requires

Used by

Links

exponent (alias for pow)

@function exponent() { ... }
View source

Refer to pow.

log

@function log($x) { ... }
View source

Description

Returns the natural logarithm of a number.

Parameters

parameter Nameparameter Descriptionparameter Typeparameter Default value
$x noneNumber none

Returns

Number

Example

$value:   log(2)  // 0.69315
$value2:  log(10) // 2.30259

Requires

Used by

_log

@function _log($x) { ... }
View source

Description

A good aproximation for $x close to 1

Parameters

parameter Nameparameter Descriptionparameter Typeparameter Default value
$x noneNumber none

Used by

frexp

@function frexp($x) { ... }
View source

Description

Returns a two-element list containing the normalized fraction and exponent of number.

Parameters

parameter Nameparameter Descriptionparameter Typeparameter Default value
$x none- none

Returns

List

(fraction, exponent)

Used by

ldexp

@function ldexp($x, $exp) { ... }
View source

Description

Returns $x * 2^$exp

Parameters

parameter Nameparameter Descriptionparameter Typeparameter Default value
$x noneNumber none
$exp noneNumber none

Used by

fact

@function fact($x) { ... }
View source

Description

Returns the factorial of a non-negative integer.

Parameters

parameter Nameparameter Descriptionparameter Typeparameter Default value
$x noneNumber none

Returns

Number

Example

$value:  fact(0) // 1
$value2: fact(8) // 40320

Used by

gcd

@function gcd($number-1, $number-2) { ... }
View source

Description

Greatest Common Divisor calculation (useful for calculating grids and widths).

Parameters

parameter Nameparameter Descriptionparameter Typeparameter Default value
$number-1 noneNumber none
$number-2 noneNumber none

Returns

Number

Links

sqrt (aliased as sqroot )

@function sqrt($base, $precision: 12) { ... }
View source

Description

Find the square root of a value.

Parameters

parameter Nameparameter Descriptionparameter Typeparameter Default value
$base noneNumber none
$precision noneNumber12

Requires

Used by

sqroot (alias for sqrt)

@function sqroot($r) { ... }
View source

Refer to sqrt.

sin

@function sin($angle) { ... }
View source

Description

Determines the Sine of an angle. Reference

Parameters

parameter Nameparameter Descriptionparameter Typeparameter Default value
$angle noneNumber none

Returns

Number

Requires

calc-interpolation

@function calc-interpolation($min-screen, $min-value, $max-screen, $max-value, $unit: vw) { ... }
View source

Description

Use linear interpolation to produce a calc value for a particular screen size.

Parameters

parameter Nameparameter Descriptionparameter Typeparameter Default value
$min-screen noneNumber none
$min-value noneNumber none
$max-screen noneNumber none
$max-value noneNumber none
$unit noneStringvw

Returns

String

Css calc() function.

Used by

Links

Author

  • Mike Riethmuller

solve-cubic-bezier

@function solve-cubic-bezier($p1x, $p1y, $p2x, $p2y, $x) { ... }
View source

Description

This is a crude Sass port webkits cubic-bezier-webkits function. Will return a "solved" cubic-bezier function for any given $x.

Parameters

parameter Nameparameter Descriptionparameter Typeparameter Default value
$p1x noneNumber none
$p1y noneNumber none
$p2x noneNumber none
$p2y noneNumber none
$x noneNumber none

Requires

Used by

Links

Author

  • Mike Riethmuller

solve-bezier-x

@function solve-bezier-x($p1x, $p1y, $p2x, $p2y, $x) { ... }
View source

Description

Solves a bezier's $x for a given cubic-bezier set.

Parameters

parameter Nameparameter Descriptionparameter Typeparameter Default value
$p1x noneNumber none
$p1y noneNumber none
$p2x noneNumber none
$p2y noneNumber none
$x noneNumber none

Used by

Author

  • Mike Riethmuller

lerp

@function lerp($a, $b, $t) { ... }
View source

Description

Linear interpolation

Parameters

parameter Nameparameter Descriptionparameter Typeparameter Default value
$a noneNumber none
$b noneNumber none
$t noneNumber none

Used by

Links

golden (aliased as PHI )

@function golden($base: 1) { ... }
View source

Description

Get the golden ratio from $base.

Parameters

parameter Nameparameter Descriptionparameter Typeparameter Default value
$base noneNumber1

Returns

Number

Requires

rad (aliased as angle-to-rad )

@function rad($angle) { ... }
View source

Parameters

parameter Nameparameter Descriptionparameter Typeparameter Default value
$angle none- none

Used by

angle-to-rad (alias for rad)

@function angle-to-rad($angle) { ... }
View source

Refer to rad.

General

variables

font-looseness (alias for auto-line-height-looseness)

Deprecated!
$font-looseness: $auto-line-height-looseness !default;
View source

Refer to auto-line-height-looseness.

font-file-location (alias for web-fonts-path)

Deprecated!
$font-file-location: '' !default;
View source

Refer to web-fonts-path.

scale-ratio (alias for auto-scale-type-ratio)

$scale-ratio: 1.125 !default;
View source

Refer to auto-scale-type-ratio.

display-class-format

$display-class-format: 'display-{%display%}' '{\\@}{%breakpoint%}' !default;
View source

Description

Formatting for utility display classes.

See

_human-readable-numerators

$_human-readable-numerators: one, two, three, four, five, six, seven, eight,
    nine, ten, eleven, twelve, thirteen, fourteen, fifteen, sixteen, seventeen,
    eighteen, nineteen, twenty;
View source

Description

Second words used to represent numbers in a fraction; Corresponds to grid interval names (whole, half, third, etc.).

_human-readable-denominators

$_human-readable-denominators: whole, half, third, quarter, fifth, sixth,
    seventh, eighth, ninth, tenth, eleventh, twelfth, thirteenth, fourteenth,
    fifteenth, sixteenth, seventeenth, eighteenth, nineteenth, twentieth,
    twentyfirst, twentysecond, twentythird, twentyfourth, twentyfifth,
    twentysixth, twentyseventh, twentyeigth, twentyninth;
View source

Description

First words used to represent numbers in a fraction; Corresponds to grid interval names (one, two, three, etc.).

_cached-values

$_cached-values: ();
View source

Description

Holds all cached function calls and their results.

Type

Map

Used by

type-headings

$type-headings: 6, 5, 4, 3, 2, 1 !global;
View source

Description

Used for defining automatic headings functions.

Type

List or Number

Used by

_silent-class-registry

$_silent-class-registry: () !global;
View source

Description

Silent class registry. Holds all auto-generated silent classes for debugging.

Used by

_all-breakpoints

$_all-breakpoints: map-keys($breakpoints);
View source

Description

All breakpoint names

Used by

breakpoint-smallest

$breakpoint-smallest: nth($_all-breakpoints, 1) !global;
View source

Description

Grabs the first $_all-breakpoints name, allowing for abstraction.

Used by

breakpoint-largest

$breakpoint-largest: nth(
        $_all-breakpoints,
        length($_all-breakpoints)
    ) !global;
View source

Description

Grabs the last $_all-breakpoints name, allowing for abstraction.

Used by

h6-fs

$h6-fs: nth($type-h6-size, 1) !global;
View source

Description

H6 font-size

Type

Number (pixel)

Used by

type-h1-lh (alias for h1-lh)

$type-h1-lh: $h1-lh !global;
View source

Refer to h1-lh.

type-h2-lh (alias for h2-lh)

$type-h2-lh: $h2-lh !global;
View source

Refer to h2-lh.

type-h3-lh (alias for h3-lh)

$type-h3-lh: $h3-lh !global;
View source

Refer to h3-lh.

type-h4-lh (alias for h4-lh)

$type-h4-lh: $h4-lh !global;
View source

Refer to h4-lh.

type-h5-lh (alias for h5-lh)

$type-h5-lh: $h5-lh !global;
View source

Refer to h5-lh.

type-h6-lh (alias for h6-lh)

$type-h6-lh: $h6-lh !global;
View source

Refer to h6-lh.

type-p-lh (alias for p-lh)

$type-p-lh: $p-lh !global;
View source

Refer to p-lh.

type-small-lh (alias for small-lh)

$type-small-lh: $small-lh !global;
View source

Refer to small-lh.

mixins

type-font-size (alias for font-size)

@mixin type-font-size() { ... }
View source

Refer to font-size.

fs (alias for font-size)

@mixin fs() { ... }
View source

Refer to font-size.

headings

@mixin headings($from: 1, $to: 6) { ... }
View source

Description

Style any number of headings all at once.

Parameters

parameter Nameparameter Descriptionparameter Typeparameter Default value
$from

Starting heading number

Number1
$to

Ending heading number

Number6

Example

@include headings(1, 3){color:#BADA55;}
// outputs:
h1, h2, h3 {color:#BADA55;}

space (alias for type-space)

@mixin space() { ... }
View source

Refer to type-space.

include-web-fonts (alias for web-fonts)

Deprecated!
@mixin include-web-fonts() { ... }
View source

Refer to web-fonts.

_font-weights

@mixin _font-weights() { ... }
View source

Description

Formats fonts taken from $web-fonts and creates their equivilent weight (with correct font-style) output.

Parameters

None.

Requires

Used by

font-face

@mixin font-face($name, $font-files, $eot, $weight, $style) { ... }
View source

Description

Generates cross-browser font-face declarations when called. $name is required, arbitrary, and what you will use in font stacks.

Parameters

parameter Nameparameter Descriptionparameter Typeparameter Default value
$name noneString none
$font-files

is required using font-files('relative/location', 'format'). For best results use this order: woff, opentype/truetype, svg

List none
$eot

is required by IE, and is a relative location of the eot file.

String none
$weight

shows if the font is bold, defaults to normal

String none
$style

defaults to normal, might be also italic

String none

Used by

rems (alias for px-to-rems)

@mixin rems() { ... }
View source

Refer to px-to-rems.

spacing-utilities-init (alias for spacing-classes)

@mixin spacing-utilities-init() { ... }
View source

Refer to spacing-classes.

_override-output

@mixin _override-output() { ... }
View source

Description

Used exclusively by create-overrides to iterate through a map of classes, properties, and values to create responsive classes.

Parameters

None.

Requires

Used by

_output-display-classes

@mixin _output-display-classes($silent: false, $important: true, $class-list: $display-classes, $format: $display-class-format) { ... }
View source

Description

Generates classes with display properties defined in $class-list. Intelligently extends duplicated display properties.

Parameters

parameter Nameparameter Descriptionparameter Typeparameter Default value
$silent noneBooleanfalse
$important noneBooleantrue
$class-list noneList$display-classes
$format noneList or String$display-class-format

Requires

Used by

display-utilities-init (alias for display-classes)

@mixin display-utilities-init() { ... }
View source

Refer to display-classes.

output-silent-classes

@mixin output-silent-classes($console: false) { ... }
View source

Description

Outputs all known auto-generated silent classes as a JSON-style list.

Parameters

parameter Nameparameter Descriptionparameter Typeparameter Default value
$console

output to the console or as a comment

Booleanfalse

Requires

clearfix

@mixin clearfix($important) { ... }
View source

Description

Add clearfix to a class

Parameters

parameter Nameparameter Descriptionparameter Typeparameter Default value
$important

make properties !important.

Boolean none

Used by

media (alias for media-query)

@mixin media() { ... }
View source

Refer to media-query.

mq (alias for media-query)

@mixin mq() { ... }
View source

Refer to media-query.

breakpoint (alias for media-query)

@mixin breakpoint() { ... }
View source

Refer to media-query.

bp (alias for media-query)

@mixin bp() { ... }
View source

Refer to media-query.

_set-global-typography-variables

@mixin _set-global-typography-variables() { ... }
View source

Description

Pulls typography variables apart and puts them into easier to use pieces. For instance $type-h1-size starts as a list and becomes a single value, while adding $type-h1-lh (line-height) to the global scope for use.

Parameters

None.

Requires

Used by

border

@mixin border($border) { ... }
View source

Description

Allows creating many border properties at once. Works like the standard border shorthand style but allows varied styles on different border directions.

Parameters

parameter Nameparameter Descriptionparameter Typeparameter Default value
$border noneList none

Example

//scss
.foo {
    @include border(2px 3px solid dashed dotted blue currentColor yellow);
}

//css
.foo {
    border-width: 2px 3px;
    border-style: solid dashed dotted;
    border-color: blue currentColor yellow;
}

Requires

specificity

@mixin specificity($specificity: 1) { ... }
View source

Description

Specificity increaser. Useful for increasing specificity of a selector instead of using !important.

Parameters

parameter Nameparameter Descriptionparameter Typeparameter Default value
$specificity noneNumber1

Example

.class {
    @include specificity(2) {
        color: red;
    }
}

//css
.class.class {
    color: red;
}

opacity

@mixin opacity() { ... }
View source

Description

Cross-browser (including IE8-) opacity.

Parameters

None.

no-bullet

@mixin no-bullet() { ... }
View source

Description

Turn off the bullet for an element of a list

Parameters

None.

Used by

no-bullets

@mixin no-bullets() { ... }
View source

Description

Turns off the bullets for an entire list

Parameters

None.

Requires

functions

baseline

@function baseline($font-size, $baseline: $base-line-height, $multiple: 1, $floor: false) { ... }
View source

Description

Aligns a font-size to a baseline ($baseline). Returns a unitless value relative to the font-size (equivilent to ems). An optional multiple can be used to make a variation on the given baseline (using decimals will divide the the baseline).

Parameters

parameter Nameparameter Descriptionparameter Typeparameter Default value
$font-size

Font size to calculate against.

Number none
$baseline

Pixel value of the base line-height.

Number$base-line-height
$multiple noneNumber1
$floor

Calculate the lowest possible number? Rarely useful.

Booleanfalse

Returns

Number

Used by

_baseline-curve

@function _baseline-curve($x, $accel: 1) { ... }
View source

Description

Calculates a where a number($x) sits along a parabolic arc (curve). Change the curve's severity by changing its $accel. An $accel of 1 is a smooth arc. Uses this formula: y = (sqrt((x^1)+x) - sqrt(x^1)) / .4142135623730951 ( Visual )

Parameters

parameter Nameparameter Descriptionparameter Typeparameter Default value
$x

Find the equivilent number on the curve.

Number none
$accel

Accepts any number between -2 and 2.35. A negative will invert the curve. 1 is a smooth curve.

Number1

Requires

_extract-line-height

@function _extract-line-height($type-size) { ... }
View source

Description

Checks if a type-size is declared as larger than 1, then either extracts the second value or calculates a line-height.

Parameters

parameter Nameparameter Descriptionparameter Typeparameter Default value
$type-size noneList or Number none

Returns

Number

The line-height

Requires

Used by

modular-scale

@function modular-scale($scale, $ratio: $scale-ratio) { ... }
View source

Description

Generates a pixel value that is an exponent of a ratio ($ratio defaults to $scale-ratio value)

Parameters

parameter Nameparameter Descriptionparameter Typeparameter Default value
$scale noneNumber none
$ratio noneNumber or List$scale-ratio

Requires

Used by

_normalize-ratio

@function _normalize-ratio() { ... }
View source

Description

Convert list ratios into single values, allowing for larger values first and then normalizing those by reversing the division logic. Always returns a value with a decimal (float).

Parameters

None.

Returns

Number

rems (alias for px-to-rems)

@function rems() { ... }
View source

Refer to px-to-rems.

ems (alias for px-to-ems)

@function ems() { ... }
View source

Refer to px-to-ems.

_exp

@function _exp() { ... }
View source

Description

A good approximation for $x close to 0. Used with pow.

Parameters

None.

str-split

@function str-split($string, $separator) { ... }
View source

Description

splits a String into a list of strings by separating the string into substrings, using a specified separator string to determine where to make each split.

Parameters

parameter Nameparameter Descriptionparameter Typeparameter Default value
$string

string to split.

String none
$separator

string points at which each split should occur.

String none

Returns

List

Used by

str-to-list (aliased as explode )

@function str-to-list($string, $delimiter) { ... }
View source

Description

Split a string into a list of strings

Parameters

parameter Nameparameter Descriptionparameter Typeparameter Default value
$string

the string to be split

String none
$delimiter

the boundary string

String none

Returns

List

the result list

Used by

Links

format-class-list (alias for format-class-name)

@function format-class-list() { ... }
View source

Refer to format-class-name.

_is-not-blank

@function _is-not-blank($value) { ... }
View source

Description

Checks if a value is blank, used specifically for list-filter

Parameters

parameter Nameparameter Descriptionparameter Typeparameter Default value
$value

the value to check

String none

Returns

Boolean

Used by

clr (alias for colors)

@function clr() { ... }
View source

Refer to colors.

set-text-color (alias for black-or-white)

@function set-text-color() { ... }
View source

Refer to black-or-white.

color-luminance (aliased as luma )

@function color-luminance($color) { ... }
View source

Description

Find the relative luminance of a color. Used by color-contrast(). Adapted from color.js

Parameters

parameter Nameparameter Descriptionparameter Typeparameter Default value
$color noneColor none

Returns

Number

0 - 1

Requires

Used by

luma (alias for color-luminance)

@function luma() { ... }
View source

Refer to color-luminance.

color-contrast

@function color-contrast() { ... }
View source

Description

Find contrast between two colors. Adapted from color.js

Parameters

None.

Returns

Number

0 - 1

Requires

Used by

generate-color-variations

@function generate-color-variations($map: $colors, $functions: (tint, tint, tint, shade, shade, shade), $increments: (20%, 40%, 80%, 20%, 40%, 80%), $variations: (light, lighter, lightest, dark, darker, darkest), $blending-colors: null) { ... }
View source

Description

Takes base color values and generates a full color palette. Used by the $$base-colors map to create a project's palette, accessible via colors().

Arguments:

  • $map: Color map you want to create variations of. Defaults to $$base-colors.
  • $functions: color functions used to generate variations (e.g. lighten or darken). Can use any blend function, provided $blending-colors are provided.
  • $increments: percentage amount to apply $function to each $variations.
  • $variations: actual names for each color tone when colors() used.
  • $blending-colors: used when a function is a blend. Can be a list or a single color.

Parameters

parameter Nameparameter Descriptionparameter Typeparameter Default value
$map noneMap$colors
$functions noneList or Strings(tint, tint, tint, shade, shade, shade)
$increments noneList or Numbers(20%, 40%, 80%, 20%, 40%, 80%)
$variations noneList or Strings(light, lighter, lightest, dark, darker, darkest)
$blending-colors noneList or Colorsnull

Requires

Used by

_combine-color-maps

@function _combine-color-maps() { ... }
View source

Description

Combines two color maps (or really any double-nested map)

Parameters

None.

Used by

_verify-color-map-depth

@function _verify-color-map-depth($color-map) { ... }
View source

Description

Makes sure color map contains the necessary depth to be used by colors function

Parameters

parameter Nameparameter Descriptionparameter Typeparameter Default value
$color-map noneMap none

Requires

Used by

ease (aliased as ease ) (alias for ease)

@function ease() { ... }
View source

Refer to ease.

c-ease (alias for cubic-easing)

@function c-ease() { ... }
View source

Refer to cubic-easing.

Sass Utilities

mixins

_output-spacing-classes

@mixin _output-spacing-classes($config) { ... }
View source

Description

Generates responsive spacing and padding classes.

Parameters

parameter Nameparameter Descriptionparameter Typeparameter Default value
$config

same values as $spacing-classes

Map none

Requires

Used by

See

functions

percentage-to-decimal

@function percentage-to-decimal($percentage) { ... }
View source

Description

Changes percent value to decimal.

Parameters

parameter Nameparameter Descriptionparameter Typeparameter Default value
$percentage noneNumber none

px-to-vw

@function px-to-vw($pixels) { ... }
View source

Description

Converts pixel dimensions to viewport width (vw) dimensions.

Parameters

parameter Nameparameter Descriptionparameter Typeparameter Default value
$pixels noneNumber none

Returns

Number

Requires

safe-get-function

@function safe-get-function($name) { ... }
View source

Description

Wrapper for Sass' internal get-function that allows for compatibility across Sass versions. If version is higher than 3.5, then the function is returned, otherwise, just the name.

Parameters

parameter Nameparameter Descriptionparameter Typeparameter Default value
$name

function name

String none

Used by

Links

safe-call

@function safe-call($name, $args...) { ... }
View source

Description

Wrapper for Sass' internal call that allows for compatibility across Sass versions. If version is higher than 3.5, then the function is returned, otherwise, just the name.

Parameters

parameter Nameparameter Descriptionparameter Typeparameter Default value
$name

function name

String none
$args...

function arguments

Any none

Requires

cache

@function cache($function-name, $args...) { ... }
View source

Description

Memoize (cache) a function's return values and arguments. Speeds up processing on intensive functions that get called many times (with the same arguments). NOTE: This can actually increase processing time if used too often or on simple functions as the lookup process isn't free. Every cached value is unique.

Parameters

parameter Nameparameter Descriptionparameter Typeparameter Default value
$function-name noneString none
$args...

Arguments to be passed to the function

Any none

Requires

Used by

strip-units

@function strip-units($value) { ... }
View source

Description

Remove lengths (px, em, rem, etc.) from a value. Usually a variable. This is sometimes required because Sass cannot calculate incompatible units (px * rem for instance).

Parameters

parameter Nameparameter Descriptionparameter Typeparameter Default value
$value noneLength none

Used by

list-to-str

@function list-to-str($list, $separator: ',') { ... }
View source

Description

Converts a list to a string with an optional separator.

Parameters

parameter Nameparameter Descriptionparameter Typeparameter Default value
$list noneList none
$separator noneString','

Returns

String

Requires

Used by

str-to-number

@function str-to-number($value) { ... }
View source

Description

Casts a string into a number.

Parameters

parameter Nameparameter Descriptionparameter Typeparameter Default value
$value

Value to be parsed

String or Number none

Returns

Number

Requires

Author

  • Hugo Giraudel

to-length

@function to-length($value, $unit) { ... }
View source

Description

Add $unit to $value

Parameters

parameter Nameparameter Descriptionparameter Typeparameter Default value
$value

Value to add unit to

Number none
$unit

String representation of the unit

String none

Returns

Number

$value expressed in $unit

Used by

Author

  • Hugo Giraudel

to-list

@function to-list($value, $keep) { ... }
View source

Description

Convert a value to a list. $keep accepts 'keys', 'values', or 'both' for map conversion.

Parameters

parameter Nameparameter Descriptionparameter Typeparameter Default value
$value noneAny none
$keep

accepts 'keys', 'values', or 'both' for map conversion.

String none

contains

@function contains($data, $value) { ... }
View source

Description

Generic contains function(similar to javascript's indexOf). Parses a variable($data) for a $value. Returns boolean. Delegates methods to the appropriate function based on variable type.

Parameters

parameter Nameparameter Descriptionparameter Typeparameter Default value
$data

the data you're searching through.

Map or List or String none
$value

the value you're searching for.

Any none

Requires

str-join

@function str-join($list, $separator: ",") { ... }
View source

Description

Converts a map or list to a string (('this', 'and', 'this') becomes 'this,and,this').

Parameters

parameter Nameparameter Descriptionparameter Typeparameter Default value
$list noneList or Map none
$separator noneString","

Requires

str-contains

@function str-contains($string, $value, $pos: 0) { ... }
View source

Description

Checks if a $string contains a $value. Optionally accepts a start ($pos) positon.

Parameters

parameter Nameparameter Descriptionparameter Typeparameter Default value
$string noneString none
$value noneString none
$pos noneNumber0

Used by

str-append

@function str-append($string, $insert) { ... }
View source

Description

Adds one string to another (e.g. str-append('hello', 'world') becomes hello world).

Parameters

parameter Nameparameter Descriptionparameter Typeparameter Default value
$string noneString none
$insert noneString none

Used by

str-replace

@function str-replace() { ... }
View source

Description

Replaces a value in a string with another.

Parameters

None.

Used by

explode (alias for str-to-list)

@function explode() { ... }
View source

Refer to str-to-list.

list-contains

@function list-contains($list, $value) { ... }
View source

Description

Check if a list contains a value

Parameters

parameter Nameparameter Descriptionparameter Typeparameter Default value
$list noneList none
$value none- none

Used by

list-reverse

@function list-reverse($list, $recursive: false) { ... }
View source

Description

Reverse a List

Parameters

parameter Nameparameter Descriptionparameter Typeparameter Default value
$list none- none
$recursive none-false

list-print

@function list-print($list, $depth: 1) { ... }
View source

Description

List print

Parameters

parameter Nameparameter Descriptionparameter Typeparameter Default value
$list none- none
$depth none-1

Used by

map-deep-set

@function map-deep-set($map, $keys...) { ... }
View source

Description

Add to a deeply nested map key. Accepts any number of keys, but the final value is the new key.

Parameters

parameter Nameparameter Descriptionparameter Typeparameter Default value
$map noneMap none
$keys...

final argument is considered the value to the be set.

String none

Used by

map-depth

@function map-depth($map) { ... }
View source

Description

Finds a map's depth at its deepest point. Useful for debugging maps.

Parameters

parameter Nameparameter Descriptionparameter Typeparameter Default value
$map noneMap none

Returns

Number

Used by

map-has-keys (aliased as map-contains-keys )

@function map-has-keys($map, $keys...) { ... }
View source

Description

Determine whether a map contains certain keys.

Parameters

parameter Nameparameter Descriptionparameter Typeparameter Default value
$map noneMap none
$keys... noneString or List none

Returns

Boolean

Used by

map-contains-keys (alias for map-has-keys)

@function map-contains-keys() { ... }
View source

Refer to map-has-keys.

map-has-nested-keys (aliased as map-contains-nested-keys )

@function map-has-nested-keys($map, $keys...) { ... }
View source

Description

Check for deep map keys

Parameters

parameter Nameparameter Descriptionparameter Typeparameter Default value
$map noneMap none
$keys... noneString or List none

Used by

map-contains-nested-keys (alias for map-has-nested-keys)

@function map-contains-nested-keys() { ... }
View source

Refer to map-has-nested-keys.

map-get-nested

@function map-get-nested($map, $keys...) { ... }
View source

Description

Get map value at nested or 'deep' key, per $keys list

Parameters

parameter Nameparameter Descriptionparameter Typeparameter Default value
$map noneMap none
$keys... noneString or List none

map-extend

@function map-extend($map, $maps...) { ... }
View source

Description

Merges multiple maps. Similar to jQuery's extend. Takes two maps and merges their differences.

Parameters

parameter Nameparameter Descriptionparameter Typeparameter Default value
$map noneMap none
$maps...

final value can be true for "deep" merging

Map or List none

Used by

map-add-depth

@function map-add-depth($map, $new-key: 'base') { ... }
View source

Description

Adds one level to a map using the new key to a map. Used by generate_color_varations(). (e.g. (key: value, key: value) becomes (key:(new-key: value), key:(new-key: value)) )

Parameters

parameter Nameparameter Descriptionparameter Typeparameter Default value
$map noneMap none
$new-key noneString'base'

Used by

map-inspect (aliased as map-print )

@function map-inspect($map) { ... }
View source

Description

Print maps into a string

Parameters

parameter Nameparameter Descriptionparameter Typeparameter Default value
$map

Useful for debugging maps.

Map none

Requires

Used by

Links

map-print (alias for map-inspect)

@function map-print() { ... }
View source

Refer to map-inspect.

silents-register

@function silents-register() { ... }
View source

Description

Add to silent classes registry

Parameters

None.

Requires

Used by

_filter-placeholders

@function _filter-placeholders($string, $reverse: false) { ... }
View source

Description

Determines if a placeholder ({_}) value in a format is needed based on characters in its surrounding. If two placeholders are next to eachother, both will be deleted. If a placeholder is surrounded by blank values, it will also be deleted. Note that this returns a list, and not a fully formatted string. This allows the return value to be recursed without incuring the performance penalty of re-casting the string to a list.

Parameters

parameter Nameparameter Descriptionparameter Typeparameter Default value
$string

String to be parsed and filtered.

String none
$reverse

Whether to parse the values from right to left or left to right. Reverse typically provides more accurate results.

Booleanfalse

Example

$foo: _filter-placeholders('{-}{%var%}{_}{_}')
@debug inspect($foo) // ">-""{%var%}"

Requires

Used by

_interpolate-placeholders

@function _interpolate-placeholders($string) { ... }
View source

Description

Container funtion for _filter-placeholders. Takes a string and gives back a string (and not a list).

Parameters

parameter Nameparameter Descriptionparameter Typeparameter Default value
$string

string to be interpolated

String none

Returns

String

Requires

See

_fast-str

@function _fast-str($list) { ... }
View source

Description

A faster list-to-string function. Should only be used in cases where speed is very important. Does very little error protection.

Parameters

parameter Nameparameter Descriptionparameter Typeparameter Default value
$list

list to be converted

List none

Used by

black-or-white (aliased as set-text-color )

@function black-or-white($color) { ... }
View source

Description

Change text color based on background-color's darkness.

Parameters

parameter Nameparameter Descriptionparameter Typeparameter Default value
$color noneColor none

Returns

Color

Example

div {
    background-color: #f8cd12;
    color: black-or-white(#f8cd12);
}
// Your text color would be black because #f8cd12 and #00000 have more contrast.

Requires

Used by

pick-best-color

@function pick-best-color($base, $colors, $tolerance: 0) { ... }
View source

Description

Compares a set of colors against $base and returns the color with the most contrast. $colors should be a list. Taken from here

Parameters

parameter Nameparameter Descriptionparameter Typeparameter Default value
$base noneColor none
$colors noneList none
$tolerance noneNumber0

Returns

Color

Example

div {
    color: pick_best_color(#f8cd12, (#a0a0c0, #fff, #2c2c2c));
}
// The function would test the colors and find that #2c2c2c is the best.

Requires

harmonize-colors

@function harmonize-colors($color-list, $blending-mode: 'overlay', $blending-color: blue, $amount: 0%) { ... }
View source

Description

Takes all colors in a map and blends them with a secondary color to even them out.

  • Should only be used as a tool to create color palletes.
  • Shouldn't be used on every compilation since it can make development fairly abstract and difficult to understand.

Parameters

parameter Nameparameter Descriptionparameter Typeparameter Default value
$color-list noneMap none
$blending-mode

blending mode to use over each color

String'overlay'
$blending-color

color to blend with.

Colorblue
$amount

amount to blend.

Percent0%

Requires

variables

easings

$easings: (
    'linear': (
        0,
        0,
        1,
        1,
    ),
    'ease': (
        0.25,
        0.1,
        0.25,
        1,
    ),
    'ease-in': (
        0.42,
        0,
        1,
        1,
    ),
    'ease-out': (
        0,
        0,
        0.58,
        1,
    ),
    'ease-in-out': (
        0.42,
        0,
        0.58,
        1,
    ),
    'ease-in-sine': (
        0.47,
        0,
        0.745,
        0.715,
    ),
    'ease-out-sine': (
        0.39,
        0.575,
        0.565,
        1,
    ),
    'ease-in-out-sine': (
        0.445,
        0.05,
        0.55,
        0.9,
    ),
    'ease-in-quad': (
        0.55,
        0.085,
        0.68,
        0.53,
    ),
    'ease-out-quad': (
        0.25,
        0.46,
        0.45,
        0.94,
    ),
    'ease-in-out-quad': (
        0.455,
        0.03,
        0.515,
        0.955,
    ),
    'ease-in-cubic': (
        0.55,
        0.055,
        0.675,
        0.19,
    ),
    'ease-out-cubic': (
        0.215,
        0.61,
        0.355,
        1,
    ),
    'ease-in-out-cubic': (
        0.645,
        0.045,
        0.355,
        1,
    ),
    'ease-in-quart': (
        0.895,
        0.03,
        0.685,
        0.22,
    ),
    'ease-out-quart': (
        0.165,
        0.84,
        0.44,
        1,
    ),
    'ease-in-out-quart': (
        0.77,
        0,
        0.175,
        1,
    ),
    'ease-in-quint': (
        0.755,
        0.05,
        0.855,
        0.06,
    ),
    'ease-out-quint': (
        0.23,
        1,
        0.32,
        1,
    ),
    'ease-in-out-quint': (
        0.86,
        0,
        0.07,
        1,
    ),
    'ease-in-expo': (
        0.95,
        0.05,
        0.795,
        0.035,
    ),
    'ease-out-expo': (
        0.19,
        1,
        0.22,
        1,
    ),
    'ease-in-out-expo': (
        1,
        0,
        0,
        1,
    ),
    'ease-in-circ': (
        0.6,
        0.04,
        0.98,
        0.335,
    ),
    'ease-out-circ': (
        0.075,
        0.82,
        0.165,
        1,
    ),
    'ease-in-out-circ': (
        0.785,
        0.135,
        0.15,
        0.86,
    ),
    'ease-in-back': (
        0.6,
        -0.28,
        0.735,
        0.045,
    ),
    'ease-out-back': (
        0.175,
        0.885,
        0.32,
        1.275,
    ),
    'ease-in-out-back': (
        0.68,
        -0.55,
        0.265,
        1.55,
    ),
    'authentic-motion': (
        0.4,
        0,
        0.2,
        1,
    ),
);
View source

Description

Map of cubic-bezier values representing named easing values (eg. ease-in, ease-out-quart). Can be "easily" accessed with easing.

Used by

See