Helpers

These mixins and functions simply provide some common general-use functionality to simplify developing with Sprout.

@function em()

Converts pixels (with or without units) to ems determined by the base font size

Used By

@function rem()

@function rem()

Converts pixels (with or without units) to rems determined by the base font size

Requires

@function em()

@function map-get-strict()

Throws an error with the specific message if the provided value is null

Used By

@function spr-palette()

@function spr-icon-name()

@function spr-space()

@function spr-breakpoint()

@function spr-elevation()

@function spr-duration()

@function spr-easing()

@function spr-font-size()

@function spr-line-height()

@function spr-font-weight()

@function spr-border-width()

@function spr-opacity()

@function spr-shadow()

@function map-set()

Adds a value to a map (returns a new map with the value)

@mixin except-last()

Projects scss content to all child elements except for the last element.

Parameters

$selector: null (string)

An optional CSS Selector. If provided, only child elements matching the selector will be considered.

@function recursive-map-merge()

Merges multidimensional maps recursively.

@function map-get-next()

Function to get next map item returns next map item or fallback value if map, key or next item does not exist

Parameters

$map: (map)

Sass list map

$key: (string)

List map key

$fallback: (boolean)

(false) - Fallback value if map, key or previous item does not exist

$return: (string)

(value) - Return value or key of previous list item

Used By

@mixin spr-hide-element()

Hides content

Requires

@function rem()

@mixin spr-pointer-select-none()

Sets the cursor to pointer and prevents content from being selectable