Settings: border
$bolt-border-radius-values [map]
Bolt's definition of border-radius scale. Used within 'export-data()' to JSON.
Code
Settings: breakpoints
$bolt-breakpoints [map]
Major breakpoints used globally in Bolt.
Code
$mq-breakpoints
A duplicate of $bolt-breakpoints - used within mq()
Code
Settings: colors
$bolt-color-default
Bolt default color var.
Code
$bolt-brand-colors [map]
Bolt Brand Colors - merged into $bolt-colors map
Code
$bolt-status-colors [map]
Bolt Status Colors - merged into $bolt-colors map
Code
$bolt-social-colors [map]
Bolt Social Colors - merged into $bolt-colors map
Code
$bolt-colors [map]
All Bolt Colors - used within bolt-color @mixin and @function
Code
Settings: global
$bolt-base-font-size--min
Global Default Min Base Font Size
Code
$bolt-base-font-size--max
Global Default Max Base Font Size
Code
$bolt-fonts--subset-loaded-class
Async Default font subset loaded class.
Code
$bolt-fonts--loaded-class
Async Default font loaded class.
Code
$bolt-shadow-color
Bolt shadow color
Code
$bolt-shadow--small
Bolt small shadow
Code
$bolt-shadow--medium
Bolt medium shadow
Code
$bolt-shadow--large
Bolt large shadow
Code
$bolt-border-width
Bolt border width
Code
$bolt-border-style
Bolt border style
Code
$bolt-border-color
Bolt border color
Code
$bolt-border-radius
Bolt border radius
Code
$bolt-transition
Bolt transition
Code
$bolt-transition-ease
Bolt transition ease
Code
$bolt-transition-timing
Bolt transition timing
Code
$bolt-translate-none
Bolt translate none effect
Code
$bolt-translate-raised--small
Bolt translate raised small effect
Code
$bolt-translate-raised--medium
Bolt translate raised medium effect
Code
$bolt-translate-raised--large
Bolt translate raised large effect
Code
$bolt-global-link-hover-opacity
Bolt default global link hover opacity
Code
$bolt-global-link-active-opacity
Bolt default global link active opacity
Code
$bolt-global-border-opacity
Bolt default global border opacity
Code
$bolt-global-border-color
Bolt default global border color
Code
$bolt-global-button-hover-mix
Bolt default global button hover mix %
Code
$bolt-global-button-hover-color
Bolt default global button hover color
Code
$bolt-global-button-active-mix
Bolt default global button active mix %
Code
$bolt-global-button-active-color
Bolt default global button active color
Code
$bolt-block-elements-list
Bolt's definition of block level elements.
Code
$bolt-all-block-elements
Bolt's definition of all unquoted block level elements.
Code
$bolt-heading-elements-list
Bolt's definition of heading elements.
Code
$bolt-all-heading-elements
Bolt's definition of all unquoted heading elements.
Code
$_bolt-custom-block-elements
Quoted custom block elements used to globally collect group generic styles. Elements registered via @mixin bolt-register-element.
Code
$_bolt-custom-inline-elements
Quoted custom inline elements used to globally collect group generic styles. Elements registered via @mixin bolt-register-element.
Code
$_bolt-custom-inline-block-elements
Quoted custom inline-block elements used to globally collect group generic styles. Elements registered via @mixin bolt-register-element.
Code
$bolt-all-custom-block-elements
All (unquoted) custom block elements used to globally collect group generic styles
Code
$bolt-all-custom-inline-block-elements
All (unquoted) custom inline-block elements used to globally collect group generic styles
Code
$bolt-all-custom-inline-elements
All (unquoted) custom inline elements used to globally collect group generic styles
Code
@mixin bolt-register-element
Register Element helper mixin: registers any custom elements getting included (used outside selector or declaration)
Code
Params
Name | Type | Description | Default |
---|---|---|---|
$element | string |
The custom element to register | (None) |
$element-type | string |
Three different types available: inline, inline-block (which may be rendered as inline-flex), and block | (None) |
Example SCSS: Utility Mixin
Settings: layout
$bolt-z-indexes [map]
Z-Index Settings
Code
$bolt-spacing-gutter
Bolt gutter spacing value
Code
$bolt-spacing-leading
Bolt default leading spacing value
Code
$bolt-spacing-squished
Bolt squished spacing value
Code
$bolt-spacing-stretched
Bolt stretched spacing value
Code
$bolt-spacing-values [map]
Bolt's definition of spacing scale. Used within 'export-data()' to JSON.
Code
$bolt-spacing-properties [map]
Bolt's definition of available spacing properties.
Code
$bolt-spacing-directions [map]
Bolt's definition of spacing directions.
Code
$bolt-spacing-types [map]
Bolt's definition of spacing types.
Code
Settings: opacity
$bolt-opacities [map]
Bolt's opacity scale.
The keys in this array are the opacity value names and not necessarily numeric. For example, a valid key could be
"semi-transparent". However, the values in this array must be valid numeric values for the CSS 'opacity' property.
Code
Settings: shadows
@function bolt-get-shadows-map
Helper function to return $bolt-shadows map
Code
Params
Name | Type | Description | Default |
---|---|---|---|
$base-color | color |
The base shadow color (with the 'transparentize' filter applied) | rgb(6, 10, 36) |
Example SCSS: Get the shadow 'sets'
Returns
map – Returns sass map of all shadow levels 'base' and 'raised' variations$bolt-shadows
Variable containing default $bolt-shadows map - utility class and sets. Used within 'export-data()' to JSON.
Code
Settings: typography
$bolt-font-family--japanese
Bolt's definition of a Japanese specific font-stack.
Code
$bolt-font-family--sans-fallback
Default sans-serif fallback font stack containing [1] maps to the system UI font and [2] known system UI fonts. Used within the $bolt-font-families map.
Code
$bolt-font-family--serif
Default serif font stack. Used within the $bolt-font-families map.
Code
$bolt-font-family--mono-fallback
Default monospace fallback font stack. Used within the $bolt-font-families map.
Code
$bolt-font-family--sans
Default sans-serif font stack. Used within the $bolt-font-families map.
Code
$bolt-font-family--sans-subset
Default sans-serif subset font stack. Used within the $bolt-font-families map.
Code
$bolt-font-family--mono
Default monospace font stack. Used within the $bolt-font-families map.
Code
$bolt-font-families [map]
Bolt's definition of body, heading, and code text.
Code
$bolt-font-size--small-bp
Small breakpoint font-size
Code
$bolt-font-size--medium-bp
Medium breakpoint font-size
Code
$bolt-font-size--xxxlarge--max
Default XXX Large Max font-size. Used within $bolt-font-sizes map.
Code
$bolt-font-size--xxxlarge--min
Default XXX Large Min font-size. Used within $bolt-font-sizes map.
Code
$bolt-font-size--xxlarge
Default XX Large font-size. Used within $bolt-font-sizes map.
Code
$bolt-font-size--xlarge
Default X Large font-size. Used within $bolt-font-sizes map.
Code
$bolt-font-size--large
Default Large font-size. Used within $bolt-font-sizes map.
Code
$bolt-font-size--medium
Medium font-size. Used within $bolt-font-sizes map.
Code
$bolt-font-size--small
Small font-size. Used within $bolt-font-sizes map.
Code
$bolt-font-size--xsmall
X Small font-size. Used within $bolt-font-sizes map.
Code
$bolt-line-height--xxxlarge
Default XXX Large line-height. Used within $bolt-font-sizes map.
Code
$bolt-line-height--xxlarge
Default XX Large line-height. Used within $bolt-font-sizes map.
Code
$bolt-line-height--xlarge
Default X Large line-height. Used within $bolt-font-sizes map.
Code
$bolt-line-height--large
Default Large line-height. Used within $bolt-font-sizes map.
Code
$bolt-line-height--medium
Default Medium line-height. Used within $bolt-font-sizes map.
Code
$bolt-line-height--small
Default Small line-height. Used within $bolt-font-sizes map.
Code
$bolt-line-height--xsmall
Default X Small line-height. Used within $bolt-font-sizes map.
Code
$bolt-line-height--tight
Default Tight line-height. Used within $bolt-font-sizes map.
Code
$bolt-font-sizes [map]
Bolt's definition of all options of possible text sizes.
Code
$bolt-font-weight--regular
Default regular font weight
Code
$bolt-font-weight--semibold
Default semibold font weight
Code
$bolt-font-weight--bold
Default bold font weight
Code
$bolt-font-weights [map]
Bolt's definition of all possible options of text weights.
Code
Tools: border
@function bolt-border-radius
Bolt border radius function
Code
Params
Name | Type | Description | Default |
---|---|---|---|
$value | string |
(None) |
Example SCSS: bolt-border-radius function
@mixin bolt-border-radius
Bolt border radius mixin
Code
Params
Name | Type | Description | Default |
---|---|---|---|
$value | string |
(None) |
Example SCSS: bolt-border-radius mixin
Tools: breakpoints
@function bolt-breakpoint
This returns the breakpoint value (with px) from $bolt-breakpoints map
Code
Params
Name | Type | Description | Default |
---|---|---|---|
$name | string |
The name of the breakpoint (from within $bolt-breakpoints) | (None) |
Example: SCSS
Returns
string – The breakpoint value (with px)@mixin bolt-mq
This provides a wrapper mixin for performing bolt media queries with mq() which allows for the use of:
$from (inclusive min-width boundary), $until (exclusive max-width boundary), $and (additional custom directives), $media-type (media type: screen, print, etc)
Code
Params
Name | Type | Description | Default |
---|---|---|---|
$args... | Bolt Media Query args ([breakpoint-name], $from, $until, $and, $media-type) | (None) |
Example SCSS: Bolt's mq() wrapper
@mixin bolt-poly-fluid-sizing
Generate linear interpolated size values through multiple break points
Code
Params
Name | Type | Description | Default |
---|---|---|---|
$property | string |
A string CSS property name | (None) |
$map | map |
A Sass map of viewport unit and size value pairs | (None) |
Example: SCSS
Tools: button reset
@mixin bolt-button-reset
Lightweight style reset for button and input elements
Code
Params
Name | Type | Description | Default |
---|---|---|---|
$value | string |
(None) |
Example SCSS: bolt-button-reset mixin
Tools: colors
@mixin bolt-button-color
Generate different background and border color button interaction states based on the primary color passed in
Code
Params
Name | Type | Description | Default |
---|---|---|---|
$color | color |
Used to generate button text, background, and border color | (None) |
Example: SCSS
@function bolt-color
Helper functions for applying global color swatches stored in Sass Maps
Code
Params
Name | Type | Description | Default |
---|---|---|---|
$color | string |
Bolt color base (e.g. indigo) | (None) |
$tone | string |
Bolt color tone (e.g. light) | $bolt-color-default |
Returns
HSL|RGB – The mapped bolt color value@mixin bolt-color
Mixin to return color value
Code
Params
Name | Type | Description | Default |
---|---|---|---|
$color | string |
Bolt color base (e.g. indigo) | (None) |
$tone | string |
Bolt color tone (e.g. light) | $bolt-color-default |
$important | string |
If 'important', then !important will be added onto the declaration string value | null |
Example SCSS: bolt-color mixin
Tools: layout
@mixin bolt-full-bleed
Places an element full browser width
Code
Example: SCSS
@mixin bolt-vertical-scroll
Provides a bolt method for controlling vertical scroll (overflow)
Code
Example: SCSS
@mixin bolt-horizontal-scroll
Provides a bolt method for controlling horizontal scroll (overflow)
Code
Example: SCSS
@function _bolt-create-spacing-map
Private bolt function to generate default spacing scale, based off of the base font size
Code
Params
Name | Type | Description | Default |
---|---|---|---|
$sizes | list |
Sizes to iterate over | (None) |
$char | string |
String to append to $keyName setting | '' |
Example SCSS: $bolt-spacing-values not shown
Returns
map – $map$bolt-spacing-sizes
A map created from $bolt-spacing-values
Code
@function bolt-spacing
Convenience function for pulling data from $bolt-spacing-sizes
Code
Params
Name | Type | Description | Default |
---|---|---|---|
$size | string |
T-shirt size to pull | (None) |
Example: SCSS
Returns
number – A spacing unit@function bolt-v-spacing
Convert shirt sizes in baseline-optimized sizes
Code
Params
Name | Type | Description | Default |
---|---|---|---|
$size | string |
T-shirt size | (None) |
$modifier | string |
Unit to multiply ending result by | null |
Example: SCSS
Returns
number@function bolt-vertical-spacing
An alias for @function bolt-v-spacing
Code
Params
Name | Type | Description | Default |
---|---|---|---|
$size | string |
T-shirt size | (None) |
Example: SCSS
Returns
number@function _bolt-collapse-directional-values
Directional-property mixins are shorthands for writing properties like the following
Code
Params
Name | Type | Description | Default |
---|---|---|---|
$vals | List |
List of directional values | (None) |
Example SCSS: Usage
Example CSS: CSS Output
Returns
List@function _bolt-contains-falsy
Checks if a list does not contain any values.
Code
Params
Name | Type | Description | Default |
---|---|---|---|
$list | list |
The list to check against. | (None) |
Returns
boolean@mixin _bolt-directional-property
Output directional properties, for instance `margin`.
Code
Params
Name | Type | Description | Default |
---|---|---|---|
$prefix | String |
Prefix to use | (None) |
$suffix | String |
Suffix to use | (None) |
$values | List |
List of values | (None) |
@mixin bolt-z-index
Bolt Z Index mixin
Code
Params
Name | Type | Description | Default |
---|---|---|---|
$key | string |
"content" |
|
$utility | boolean |
false |
Example SCSS: bolt-z-index mixin
@function bolt-z-index
Bolt Z Index function
Code
Params
Name | Type | Description | Default |
---|---|---|---|
$key | string |
(None) |
Example SCSS: bolt-z-index function
Tools: shadows
@mixin bolt-shadow
This outputs the correct bolt values for transform and box-shadow
Code
Params
Name | Type | Description | Default |
---|---|---|---|
$key | string |
The desired shadow level (e.g. 'level-30') | 'G' |
$lifted | boolean |
Weather or not to use the 'raised' values | false |
$base-color | boolean|string |
The base shadow color (with the 'transparentize' filter applied) | false |
$utility | boolean |
If true, adds '!important' to declaration | false |
Example: SCSS
Tools: typography
@function _bolt-str-replace
A private utility function for carrying out string replacement
Code
Params
Name | Type | Description | Default |
---|---|---|---|
$string | string |
The "needle" | (None) |
$search | string |
The "haystack" | (None) |
$replace | string |
The string value to replace | '' |
Example SCSS: Basic replace ($name not shown)
@mixin bolt-font-face
Adds a correctly formatted @font-face declaration. Set at the top of the stylesheet.
Code
Params
Name | Type | Description | Default |
---|---|---|---|
$name | string |
The 'font-family' name string | (None) |
$path | string |
Path to the font files | (None) |
$weight | string |
Default font weight | null |
$style | string |
Default style | null |
$exts | string |
Default extensions | woff2 woff |
Example: SCSS
@mixin bolt-font-family
This returns the font-family for a specific element. Brand fonts are the default, with system fonts as the fallback.
Code
Params
Name | Type | Description | Default |
---|---|---|---|
$type | string |
Defines the font-family being used for each type of text: heading, body, or code. | (None) |
$is_root | boolean |
false |
Example SCSS: bolt-font-family mixin
@mixin bolt-font-kerning
This applies default font kerning styles for supporting browsers.
Code
Example SCSS: Setting globals
@mixin bolt-font-size
This returns the font-size and relevant line-height for a specific element.
Code
Params
Name | Type | Description | Default |
---|---|---|---|
$size | string |
Defines the size of the text: xsmall, small, base, medium, large, xlarge, or xxlarge. | (None) |
$leading | string |
Defines the line-height of the text: regular or tight. | regular |
Example: SCSS
@mixin bolt-font-weight
This returns the font-weight for a specific element.
Code
Params
Name | Type | Description | Default |
---|---|---|---|
$weight | string |
Defines the weight of the text: bold, semi-bold, regular, or normal. | (None) |
Example SCSS: Mixin
Example CSS: Output
@function bolt-text-contrast
Determines the correct color (black or white) to return, given the color passed in
Code
Params
Name | Type | Description | Default |
---|---|---|---|
$color | color |
The color to check against | (None) |
Example SCSS: $primary-background-default not shown
Returns
color – Either 'black' or 'white'@mixin bolt-uppercase
Provides a bolt method for transforming text to uppercase
Code
Example: SCSS
Tools: utilities
@mixin bolt-if-browser-supports-display-contents
Just checking "@supports (display: contents)" isn't enough to know that a browser supports it FULLY. So, we check
support for both "display: contents" and "caret-color" (which has similar browser support) -- if a browser fails
either check, it gets the cross-browser fallback instead.
Code
Example: SCSS
@mixin bolt-clearfix
Provides the ability to add a proper clearfix
Code
Params
Name | Type | Description | Default |
---|---|---|---|
$important | boolean |
Set true to add "!important" | null |
Example: SCSS
@mixin bolt-ie11-only
Define CSS that only targets Internet Explorer 11.
Code
Example: SCSS
@function bolt-linear-interpolation
Calculate the definition of a line between two points
Code
Params
Name | Type | Description | Default |
---|---|---|---|
$map | map |
A SASS map of viewport widths and size value pairs | (None) |
Example: SCSS
Returns
Number – A linear equation as a calc() function@function bolt-list-remove
Removed an item for a SASS list based on it's index (mimics behavior of the native map-remove function)
Code
Params
Name | Type | Description | Default |
---|---|---|---|
$list | list |
A SASS list | (None) |
$index | string |
The list index to remove | (None) |
Example: SCSS
Returns
list – $newList - A SASS list@function bolt-list-sort
Sort a SASS list
Code
Params
Name | Type | Description | Default |
---|---|---|---|
$list | list |
A SASS list | (None) |
Example SCSS: Sorting ($map not shown)
Returns
List – $sortedlist - A sorted SASS list@function bolt-map-sort
Sort map by keys
Code
Params
Name | Type | Description | Default |
---|---|---|---|
$map | map |
A SASS map | (None) |
Example SCSS: ($map not shown)
Returns
Map – $sortedMap - A SASS map sorted by keys@mixin bolt-no-select
Provides a bolt method for controlling the user's ability to select text.
Code
Example: SCSS
@mixin bolt-opacity
Bolt Opacity mixin
Code
Params
Name | Type | Description | Default |
---|---|---|---|
$value | string |
(None) | |
$important | boolean |
false |
Example SCSS: bolt-opacity mixin
@function bolt-opacity
Bolt Opacity function
Code
Params
Name | Type | Description | Default |
---|---|---|---|
$value | string |
(None) |
Example SCSS: bolt-opacity function
@function bolt-rem
Bolt utility function to convert pixels to rems
Code
Params
Name | Type | Description | Default |
---|---|---|---|
$pixels | string|number |
The pixel value to convert | (None) |
$context | string|number |
Value to divide pixel value by (before rem multiplication) | $bolt-base-font-size--min |
Example: SCSS
Returns
string – rem value (with unit)@mixin bolt-repeat-rule
Repeat a block of styles as a separate rule-set for each selector provided. Does not combine multiple selectors with commas.
Most often used with selectors like `:host` which do not work properly when combined with other selectors.
Code
Params
Name | Type | Description | Default |
---|---|---|---|
$selectors | list |
A SASS list of selectors | (None) |
Example: SCSS
@function bolt-strip-unit
Remove the unit of a length.
Code
Params
Name | Type | Description | Default |
---|---|---|---|
$number | Number |
Number to remove unit from | (None) |
Example: SCSS
Returns
Number – Unitless number@mixin bolt-visuallyhidden
Provides a bolt method for correctly hiding an element visually (for accessibility)
Code
Params
Name | Type | Description | Default |
---|---|---|---|
$important | string |
If 'important' is set, than '!important' will be returned | null |
Example: SCSS
Undefined
@function bolt-css-vars-assign
Assigns a variable to the global map
Code
@function bolt-var
Emulates var() CSS native function behavior
Code
Params
Name | Type | Description | Default |
---|---|---|---|
$args | String |
Variable name | (None) |
$args2 | string |
Optional default value if variable is not assigned yet | (None) |
Example SCSS: basic usage
@mixin bolt-css-vars
CSS mixin to provide variables
Code
Params
Name | Type | Description | Default |
---|---|---|---|
$varMap | Map |
Check for our params | null |
$root | Boolean |
Output as root? | false |
Example SCSS: "basic usage"
@function bolt-json-encode
Delay the encoding of ta literal to JSON to a type-specific method
Code
Params
Name | Type | Description | Default |
---|---|---|---|
$value | * |
value to be stringified | (None) |
Returns
String – JSON encoded string@function _proof-quote
Proof quote a value
Code
Params
Name | Type | Description | Default |
---|---|---|---|
$value | * |
value to be quoted | (None) |
Returns
String – quoted value@mixin bolt-json-encode
JSON.stringify a value and pass it as a font-family of head element
Code
Params
Name | Type | Description | Default |
---|---|---|---|
$value | * |
value to be stringified | (None) |
$flag | String |
(all) - output driver | (None) |
@function _json-encode--bool
Encode a bool to JSON
Code
Params
Name | Type | Description | Default |
---|---|---|---|
$bool | Bool |
bool to be encoded | (None) |
Returns
Bool – encoded bool@function _json-encode--color
Encode a color to JSON
Code
Params
Name | Type | Description | Default |
---|---|---|---|
$color | Color |
color to be encoded | (None) |
Returns
String – encoded color@function _json-encode--list
Encode a list to JSON
Code
Params
Name | Type | Description | Default |
---|---|---|---|
$list | List |
list to be encoded | (None) |
Returns
String – encoded list@function _json-encode--map
Encode a map to JSON
Code
Params
Name | Type | Description | Default |
---|---|---|---|
$map | Map |
map to be encoded | (None) |
Returns
String – encoded map@function _json-encode--null
Encode `null` to JSON
Code
Params
Name | Type | Description | Default |
---|---|---|---|
$null | Null |
`null` | (None) |
Returns
String@function _json-encode--number
Encode a number to JSON
Code
Params
Name | Type | Description | Default |
---|---|---|---|
$number | Number |
number to be encoded | (None) |
Returns
String – encoded number@function _json-encode--string
Encode a string to JSON
Code
Params
Name | Type | Description | Default |
---|---|---|---|
$string | String |
string to be encoded | (None) |