Layout Tokens

All breakpoints, positioning, and spacing values in Sprout are ultimately derived from Layout tokens. Layout tokens are broken out by category: spacing, breakpoints, justification, etc.

A map containing all Sprout layout tokens.

Map Properties

spacing: (map)

Spacing tokens are used primarily to control padding and margin.

breakpoints: (map)

Breakpoint token values represent the inclusive lower limit of the breakpoint, for example tablet: rem(600px) applies to 600px - 899px.

justification: (map)

Justification tokens represent all of the ways Sprout allows elements to be layed out horizontally in a flex container.

elevation: (map)

Elevation tokens are used to control the z-index of an element.

text-alignment: (map)

Text-alignment tokens are used to control the alignment of the text in a container.

Spacing Sizes

Size Previews

Breakpoint Sizes

Size Previews

Configuration

@mixin spr-config-layout()

Configures Sprout layout tokens by recursively merging in the provided map.

Parameters

$custom-config: () (map)

Sprout layout token map that matches the form of $spr-tokens-layout

Related

@mixin spr-config()

prose

Requires

Used By

@mixin spr-config()

Getter Functions

@function spr-spacing-tokens()

Gets the spacing token map.

Requires

Used By

@function spr-space()

@function spr-breakpoint-tokens()

Gets the breakpoint token map.

Requires

Used By

@function spr-breakpoint()

@function spr-justification-tokens()

Gets the justification token map.

Requires

Used By

@function spr-text-alignment-tokens()

Gets the text-alignment token map.

Requires

Used By

@function spr-space()

Gets a spacing value in rem given a spacing token.

Parameters

$space-token: (string)

Spacing token such as ‘sm’ or ‘lg’.

@function spr-breakpoint()

Gets a breakpoint value in rem given a breakpoint token.

Parameters

$breakpoint-token: (string)

Breakpoint token such as ‘phone’ or ‘desktop’.

@function spr-breakpoint-max()

Gets the maximum breakpoint value in rem given a breakpoint token.

Parameters

$breakpoint-token: (string)

Breakpoint token such as ‘phone’ or ‘desktop’.

Requires

@function spr-breakpoint()

@function map-get-next()

@function spr-justification()

Gets a flexbox alignment value given a justification token.

Parameters

$justification-token: (string)

Justification token such as ‘left’ or ‘right’.

@function spr-elevation()

Gets a elevation value given an elevation token.

Parameters

$elevation-token: (string)

elevation token such as ‘low’ or ‘high’.

Requires

@function map-get-strict()

@function spr-text-alignment()

Gets text alignment value given a text-alignment token.

Parameters

$text-alignment-token: (string)

Text-alignment token such as ‘left’ or ‘right’.

Requires

@function map-get-strict()

@function spr-size()

Generates styles for width of base space(md) given a multiplier.

Parameters & Return

$multiplier: (number)

Multiplier for dynamic size of width, constrained by the base space(md)

@return (number)

width of multiplier * base space(md)

Requires

@function spr-space()