accessibility
mixins
a11yVisibility
@mixin a11yVisibility($val) { ... }
Description
Removes element from document flow and hides it according to a11y best practices
Parameters
parameterName | parameterDescription | parameterType | parameterDefault value |
---|---|---|---|
$val | 'hidden' or 'visible' | String | —none |
Example
.visualHide { @include a11yVisibility('hidden'); }
.visualShow { @include a11yVisibility('visible'); }
alignment
mixins
valignChildren
@mixin valignChildren($alignment: center) { ... }
Description
Aligns children of selected element using flexbox
Parameters
parameterName | parameterDescription | parameterType | parameterDefault value |
---|---|---|---|
$alignment | any valid | String | center |
Example
@include valignChildren(center); // centers children in element
@include valignChildren(top); // positions children to top of element
@include valignChildren(bottom); // positions children to bottom of element
Requires
- [variable]
flexAlignMap
background
placeholders
imgFill
%imgFill { ... }
Description
Sets background properties that center a background image, set size to cover
, and overflow
to hidden
Example
@extend %imgFill;
border
mixins
standardBorder
@mixin standardBorder($side: 'top', $size: 1px) { ... }
Description
Applies standard border using default border-color
, including rules for inverted context.
Parameters
parameterName | parameterDescription | parameterType | parameterDefault value |
---|---|---|---|
$side | side to apply the border | String | 'top' |
$size | border width | Value(px) | 1px |
Example
@include standardBorder(); // default = top
// apply border to bottom OR
// 'top', 'left', 'right', 'bottom', 'all', 'none'
@include standardBorder('bottom');
// apply a custom size (default = 1px)
@include standardBorder('all', 4px);
breakpoint
mixins
atMediaUp
@mixin atMediaUp($breakpoint) { ... }
Description
This breakpoint mixin uses a mobile first strategy, meaning the medium
breakpoint, for example, applies to medium screens and larger.
atMediaUp(small)
Small sreens and upatMediaUp(medium)
Landscape on most phones and up; portrait on some phabletsatMediaUp(large)
Landscape on phabelts and up; portrait on most tablets or old desktopsatMediaUp(huge)
Modern desktop viewports and up or ridiculous huge tablets
Parameters
parameterName | parameterDescription | parameterType | parameterDefault value |
---|---|---|---|
$breakpoint | breakpoint keyword (ie. small, medium, large, huge) | Value | —none |
Content
This mixin allows extra content to be passed (through the @content
directive). Role: [wraps conetnt in media query string matching breakpoint keyword]
Example
@include atMediaUp(medium) {
body::after {
content: "medium screens and larger can see me";
}
}
variables
breakpoint-map
$breakpoint-map: (
s: $breakpoint-s,
m: $breakpoint-m,
l: $breakpoint-l,
xl: $breakpoint-xl
);
Description
breakpoint aliases map
Map structure
keyName | keyDescription | keyType | keyValue |
---|---|---|---|
breakpoint-map.s | —none | Value(px) | 440px |
breakpoint-map.m-content | —none | Value(px) | 640px |
breakpoint-map.l | —none | Value(px) | 840px |
breakpoint-map.xl | —none | Value(px) | 1024px |
brightness
functions
isDark
@function isDark($color, $threshold: $brightness_threshold) { ... }
Description
Tests if color is dark
Parameters
parameterName | parameterDescription | parameterType | parameterDefault value |
---|---|---|---|
$color | RGB, RGBA, HSL, or hex color value | Color | —none |
$threshold | brightness threshold for "dark" | Number | $brightness_threshold |
Returns
Boolean
Example
isDark
isDark(#000)
// -> True
Used by
- [function]
isLight
- [function]
getPrimaryTextColor
isLight
@function isLight($color, $threshold: $brightness_threshold) { ... }
Description
Tests if color is light
Parameters
parameterName | parameterDescription | parameterType | parameterDefault value |
---|---|---|---|
$color | RGB, RGBA, HSL, or hex color value | Color | —none |
$threshold | brightness threshold for "dark" | Number | $brightness_threshold |
Returns
Boolean
Example
isLight
isLight(#FFF)
// -> True
Requires
- [function]
isDark
getPrimaryTextColor
@function getPrimaryTextColor($color) { ... }
Description
Selects a contrasting color
for a given background color
Parameters
parameterName | parameterDescription | parameterType | parameterDefault value |
---|---|---|---|
$color | RGB, RGBA, HSL, or hex color value | Color | —none |
Returns
Color
—$C_contrastLightBG OR $C_contrastDarkBG
Example
getPrimaryTextColor
color: getPrimaryTextColor( $myBackgroundColor );
Requires
- [function]
isDark
browser
mixins
browser-ie11
@mixin browser-ie11() { ... }
Description
Applies styles to IE10 and IE11 using a vendor-specific media query. Because we currently only support IE11, this can be treated as an IE11-only filter.
Parameters
None.
Content
This mixin allows extra content to be passed (through the @content
directive). Role: [Wraps content in a vendor-specific media query that is only read by IE11]
Example
// default styles
.someClass {
padding: 0;
}
// IE11 overrides
@include browser-ie11() {
.someClass {
padding-top: $space;
}
}
Used by
- [mixin]
buttonBase
browser-lessThanIE
@mixin browser-lessThanIE($IE_version) { ... }
Description
Targets styles to specific IE versions using the root class method (applying classes to the body
tag with IE conditional comments).
Parameters
parameterName | parameterDescription | parameterType | parameterDefault value |
---|---|---|---|
$IE_version | IE version number | String | —none |
Content
This mixin allows extra content to be passed (through the @content
directive). Role: [Wraps content with a selector that includes a root body class name generated by IE conditional comments]
Example
.myClass {
@include browser-lessThanIE( 10 ) { ...styles for all IE versions below 10... }
@include browser-lessThanIE( 9 ) { ...styles for all IE versions below 9... }
}
Throws
invalid argument for mixin
Requires
- [variable]
root-browserIEPrefix
Used by
- [mixin]
flexParent
- [mixin]
flexParent
- [mixin]
flexChild
- [mixin]
flexChild
- [mixin]
flexChild
browser-modern
@mixin browser-modern() { ... }
Description
Applies styles contained in content directive to "modern" browsers only (excludes IE versions less than 10).
Parameters
None.
Content
This mixin allows extra content to be passed (through the @content
directive). Role: [Wraps content with a selector that includes a root body class name generated by IE conditional comments]
Example
.myClass {
@include browser-modern() { ...applies to all browsers except IE 9 and below... }
}
Requires
- [variable]
root-browserIEPrefix
button
placeholders
buttonPersonality
%buttonPersonality { ... }
Description
Sets button-like properties (pointer, user-select, etc)
Used by
- [mixin]
buttonBase
mixins
buttonBase
@mixin buttonBase() { ... }
Description
Applies base button styles using a mixin. (The extend
directive can cause ugly cascade problems)
Parameters
None.
Example
@include buttonBase();
Requires
- [mixin]
browser-ie11
- [placeholder]
buttonPersonality
- [variable]
defaultRadius
- [variable]
font-size-small
- [variable]
line-height-smallText
- [variable]
space-half
- [variable]
space-double
buttonColor
@mixin buttonColor($bgColor, $hoverColor: darken($bgColor, 5%), $activeColor: darken($bgColor, 12%), $textColor: getPrimaryTextColor($bgColor), $textTransition: true) { ... }
Description
Applies button color-related styles using a mixin.
Parameters
parameterName | parameterDescription | parameterType | parameterDefault value |
---|---|---|---|
$bgColor | resting button background color. Should not be a custom property unless | Color | —none |
$hoverColor | hovered button background color | Color | darken($bgColor, 5%) |
$activeColor | pressed button background color | Color | darken($bgColor, 12%) |
$textColor | color of text inside of button | Color | getPrimaryTextColor($bgColor) |
$textTransition | whether to animate color change of button text or icon on :hover | Boolean | true |
Example
@include buttonColor($bgColor: $C_red);
@include buttonColor(
$bgColor: $C_red,
$hoverColor: darken($C_red, 10%),
$activeColor: darken($C_red, 15%)
);
@include buttonColor(
$bgColor: $C_red,
$hoverColor: darken($C_red, 10%),
$activeColor: darken($C_red, 15%),
$textTransition: false
);
Requires
- [mixin]
color-all
color
functions
getGradientList
@function getGradientList($baseColor, $numColors, $spectrum: -90deg) { ... }
Parameters
parameterName | parameterDescription | parameterType | parameterDefault value |
---|---|---|---|
$baseColor | keyword, hex, rgba, rgb, or hsl color | Color | —none |
$numColors | number of color steps to return | Number | —none |
$spectrum | hue spectrum to cover in gradient | Degrees | -90deg |
Returns
List
—Sass list of color values for gradient
Example
@each $color in getGradientList('blue', 12) {
// $color = step in a 12 step gradient from 'blue'
}
rgba-to-hex
@function rgba-to-hex($rgba, $bgColor) { ... }
Parameters
parameterName | parameterDescription | parameterType | parameterDefault value |
---|---|---|---|
$rgba | rgba color | Color | —none |
$bgColor | the background color used to calculate opaque color | Color | —none |
Returns
Color
—Opaque HEX color
Example
.example {
background-color: rgba-to-hex($C_textHint, $C_white);
}
mixins
color-svg
@mixin color-svg($color, $isImportant) { ... }
Description
Sets properties to color SVG icons
Parameters
parameterName | parameterDescription | parameterType | parameterDefault value |
---|---|---|---|
$color | keyword, hex, rgba, rgb, or hsl color | Color | —none |
$isImportant | —none | Boolean | —none |
Example
.someSVG {
@include color-svg(pink);
}
Used by
- [mixin]
color-all
color-all
@mixin color-all($color, $isImportant) { ... }
Description
Sets properties to color SVG icons AND text
Parameters
parameterName | parameterDescription | parameterType | parameterDefault value |
---|---|---|---|
$color | keyword, hex, rgba, rgb, or hsl color | Color | —none |
$isImportant | —none | Boolean | —none |
Example
.someSVG {
@include color-all(black);
}
Requires
- [mixin]
color-svg
Used by
- [mixin]
buttonColor
- [placeholder]
text--secondary
- [placeholder]
text--secondary
- [placeholder]
text--tertiary
- [placeholder]
text--tertiary
- [placeholder]
text--link
- [placeholder]
text--link
- [placeholder]
text--attention
- [placeholder]
text--disabled
- [placeholder]
text--disabled
variables
brightness_threshold
$brightness_threshold: 160;
Description
0-255 threshold for brightness functions
Type
Number
See
C_contrast[DargBG|LightBG]
$C_contrast[DargBG|LightBG]: $C_white;
Description
"Contrast text" colors for programmatic text colors
Type
Color
See
- [function]
getPrimaryTextColor
config
variables
root-debugEnable
$root-debugEnable: "enableDebug";
Description
Class name to allow debug
elements to appear
Type
String
root-language-map
$root-language-map: (
"en": ".lang_en",
"es": ".lang_es",
"de": ".lang_es",
"fr": ".lang_fr",
"it": ".lang_it",
"ja": ".lang_ja",
"pt": ".lang_pt",
"pl": ".lang_pl",
"nl": ".lang_nl",
"ko": ".lang_ko",
"sv": ".lang_sv"
);
Description
Map iso639-2 lang codes to body class names
Type
String
Used by
- [mixin]
i18n-only
- [mixin]
i18n-exclude
root-browserIEPrefix
$root-browserIEPrefix: "ieRoot_";
Description
Prefix for IE conditional class names
Type
String
Used by
- [mixin]
browser-lessThanIE
- [mixin]
browser-modern
display
mixins
pseudoDisplay
@mixin pseudoDisplay($value: block) { ... }
Description
Sets display property for psuedo-elements
Parameters
parameterName | parameterDescription | parameterType | parameterDefault value |
---|---|---|---|
$value | valid CSS | Value | block |
Example
@include pseudoDisplay($value: block);
flexbox
mixins
flexParent
@mixin flexParent($orientation, $useFallback: true) { ... }
Description
Sets flexbox properties for a flex parent (display: flex;
)
Parameters
parameterName | parameterDescription | parameterType | parameterDefault value |
---|---|---|---|
$orientation | 'row' or 'column' | String | —none |
$useFallback | use IE < v10 fallback | Boolean | true |
Example
@include flexParent('row'); // displays element as flex with children in row orientation
@include flexParent('column'); // displays element as flex with children in column orientation
@include flexParent('row', false); // optional second argument allows disabling of IE table display fallbacks
Requires
- [mixin]
browser-lessThanIE
- [mixin]
browser-lessThanIE
flexChild
@mixin flexChild($variant, $useFallback: true) { ... }
Description
Sets flexbox properties for a flex children.
Parameters
parameterName | parameterDescription | parameterType | parameterDefault value |
---|---|---|---|
$variant | 'shrink' or 'grow' | String | —none |
$useFallback | use IE < v10 fallback | Boolean | true |
Example
@include flexChild('grow'); // sets element to grow to fill remaining space in flex parent
@include flexChild('shrink'); // sets element to shirnk to the width of its content
@include flexChild('shrink', false); // optional second argument allows disabling of IE table display fallbacks
Requires
- [mixin]
browser-lessThanIE
- [mixin]
browser-lessThanIE
- [mixin]
browser-lessThanIE
float
placeholders
clearfix
%clearfix { ... }
Description
Clears floated children
Example
.parentWithFloatedChildren {
@extend %clearfix;
}
forms
mixins
resetFieldStyles
@mixin resetFieldStyles() { ... }
Description
resets form field styles
Parameters
None.
Example
input.reset {
@include resetFieldStyles();
}
formInput
@mixin formInput() { ... }
Description
provides default input styles
Parameters
None.
Example
input {
@include formInput();
}
Requires
- [variable]
defaultRadius
- [variable]
space-quarter
- [variable]
space
formInput--disabled
@mixin formInput--disabled() { ... }
Description
provides default styles for a disabled input
Parameters
None.
Example
input[disabled] {
@include formInput--disabled();
}
formInput--hovered
@mixin formInput--hovered() { ... }
Description
provides default styles for a hovered input
Parameters
None.
Example
input:hover {
@include formInput--hovered();
}
formInput--focused
@mixin formInput--focused() { ... }
Description
provides default styles for a focused input
Parameters
None.
Example
input:focus {
@include formInput--focused();
}
i18n
mixins
i18n-only
@mixin i18n-only($langs) { ... }
Description
Filter style rules to a specific language or set of languages using classes applied to the body
element of a document
i18n helpers assume your document has a lang_{lang}
class on the body
element.
Parameters
parameterName | parameterDescription | parameterType | parameterDefault value |
---|---|---|---|
$langs | ISO 639-1 language codes (ie. 'en') | String or String... | —none |
Content
This mixin allows extra content to be passed (through the @content
directive). Role: [Wraps content in a selector that includes a root body className specific to provided languages]
Example
@include i18n-only('en') {
text-transform: uppercase; // only upercasse for English
}
@include i18n-only('en', 'it') { ... } // multiple languages supported
Requires
- [variable]
root-language-map
i18n-exclude
@mixin i18n-exclude($langs) { ... }
Description
Excludes styles from a specific language or set of languages using classes applied to the body
element of a document
i18n helpers assume your document has a lang_{lang}
class on the body
element.
Parameters
parameterName | parameterDescription | parameterType | parameterDefault value |
---|---|---|---|
$langs | ISO 639-1 language codes (ie. 'en') | String or String... | —none |
Content
This mixin allows extra content to be passed (through the @content
directive). Role: [Wraps content in a selector that includes a root body className specific to provided languages]
Example
@include i18n-exclude('de') {
text-transform: uppercase; // uppercase every language except German
}
@include i18n-exclude('ja', 'es', 'de') { ... } // multiple languages supported
Requires
- [variable]
root-language-map
layout
variables
modal-width
$modal-width: $width-modal;
Description
modal default width (provided by swarm-constants)
Type
Value(px)
bounds
$bounds: $width-bounds;
Description
bounds default width (provided by swarm-constants)
Type
Value(px)
bounds-wide
$bounds-wide: $width-bounds-wide;
Description
bounds wide variant width (provided by swarm-constants)
Type
Value(px)
smallRadius
$smallRadius: $radius-small;
Description
small border-radius value (provided by swarm-constants)
Type
Value(px)
defaultRadius
$defaultRadius: $radius-normal;
Description
default border-radius value (provided by swarm-constants)
Type
Value(px)
Used by
- [mixin]
buttonBase
- [mixin]
formInput
largeRadius
$largeRadius: $radius-large;
Description
large border-radius value (provided by swarm-constants)
Type
Value(px)
zindex-map
$zindex-map: (
main: $zindex-main,
floating-content: $zindex-floatingContent,
shade: $zindex-shade,
shade-content: $zindex-shadeContent,
modal: $zindex-modal,
popup: $zindex-popup
);
Description
zindex aliases (provided by swarm-constants)
Map structure
keyName | keyDescription | keyType | keyValue |
---|---|---|---|
zindex-map.main | —none | Number | 0 |
zindex-map.floating-content | —none | Number | 10 |
zindex-map.shade | —none | Number | 20 |
zindex-map.shade-content | —none | Number | 25 |
zindex-map.modal | —none | Number | 30 |
zindex-map.popup | —none | Number | 50 |
display-values
$display-values: (none, block, flex, inline, inline-block, inline-flex, grid);
Description
Convenience list of possible display
values. see str-firstCharToUpper
for managing camelCasing
Type
List
See
- [function]
str-firstCharToUpper
flexJustifyMap
$flexJustifyMap: (
"flexEnd": flex-end,
"center": center,
"spaceBetween": space-between,
"spaceAround": space-around
);
Description
camelCase to CSS values. omits flex-start
because it is a default prop of Flex items
Map structure
keyName | keyDescription | keyType | keyValue |
---|---|---|---|
flexJustifyMap.flexEnd | —none | Value | flex-end |
flexJustifyMap.center | —none | Value | center |
flexJustifyMap.spaceBetween | —none | Value | space-between |
flexJustifyMap.spaceAround | —none | Value | space-around |
flexAlignMap
$flexAlignMap: ("top": flex-start, "bottom": flex-end, "center": center);
Description
map of justify-content
values human-readable keys to justify-content
values
Map structure
keyName | keyDescription | keyType | keyValue |
---|---|---|---|
flexAlignMap.top | —none | Value | flex-start |
flexAlignMap.bottom | —none | Value | flex-end |
flexAlignMap.center | —none | Value | center |
Used by
- [mixin]
valignChildren
list
placeholders
list--reset
%list--reset { ... }
Description
Resets lists and list items (removes padding, margin, and bullets)
Example
.someSVG {
@extend %list--reset;
}
position
mixins
centerAbsolute
@mixin centerAbsolute($elementWidth) { ... }
Description
Absolutely positions selected element and centers with left
and negative margin
Parameters
parameterName | parameterDescription | parameterType | parameterDefault value |
---|---|---|---|
$elementWidth | width of element (in | Value | —none |
Example
.myClass {
@include centerAbsolute($elementWidth);
margin-top: 10vh; // specify your own `top` or `margin-top` value
}
fullScreenAbsolute
@mixin fullScreenAbsolute() { ... }
Description
Absolutely positions selected element and stretches it to fill the viewport
Parameters
None.
Example
.myOverlay {
@include fullScreenAbsolute();
background-color: rgba(0,0,0,0.7);
}
scale
variables
block
$block: $block-1;
Description
scales from 48px @ 1:1.5 (provided by swarm-constants)
Type
Value(px)
block-2
$block-2: $block-2;
Description
scales from 48px @ 1:1.5 (provided by swarm-constants)
Type
Value(px)
block-3
$block-3: $block-3;
Description
scales from 48px @ 1:1.5 (provided by swarm-constants)
Type
Value(px)
block-4
$block-4: $block-4;
Description
scales from 48px @ 1:1.5 (provided by swarm-constants)
Type
Value(px)
block-5
$block-5: $block-5;
Description
scales from 48px @ 1:1.5 (provided by swarm-constants)
Type
Value(px)
block-6
$block-6: $block-6;
Description
scales from 48px @ 1:1.5 (provided by swarm-constants)
Type
Value(px)
block-7
$block-7: $block-7;
Description
scales from 48px @ 1:1.5 (provided by swarm-constants)
Type
Value(px)
space
$space: $space-1;
Description
scales from 16px @ 1:1.5 (provided by swarm-constants)
Type
Value(px)
Used by
- [mixin]
formInput
space-2
$space-2: $space-2;
Description
scales from 16px @ 1:1.5 (provided by swarm-constants)
Type
Value(px)
space-3
$space-3: $space-3;
Description
scales from 16px @ 1:1.5 (provided by swarm-constants)
Type
Value(px)
space-4
$space-4: $space-4;
Description
scales from 16px @ 1:1.5 (provided by swarm-constants)
Type
Value(px)
space-5
$space-5: $space-5;
Description
scales from 16px @ 1:1.5 (provided by swarm-constants)
Type
Value(px)
space-6
$space-6: $space-6;
Description
scales from 16px @ 1:1.5 (provided by swarm-constants)
Type
Value(px)
space-7
$space-7: $space-7;
Description
scales from 16px @ 1:1.5
Type
Value(px)
space-8
$space-8: $space-8;
Description
scales from 16px @ 1:1.5 (provided by swarm-constants)
Type
Value(px)
space-and-half
$space-and-half: $space-1 * 1.5;
Description
scales from 16px @ 1:1.5
Type
Value(px)
space-double
$space-double: $space-double;
Description
scales from 16px @ 1:1.5 (provided by swarm-constants)
Type
Value(px)
Used by
- [mixin]
buttonBase
space-half
$space-half: $space-half;
Description
scales from 16px @ 1:1.5 (provided by swarm-constants)
Type
Value(px)
Used by
- [mixin]
buttonBase
space-quarter
$space-quarter: $space-1 / 4;
Description
scales from 16px @ 1:1.5 (provided by swarm-constants)
Type
Value(px)
Used by
- [mixin]
formInput
media-xs
$media-xs: $space-1;
Type
Value(px)
media-s
$media-s: $space-2;
Type
Value(px)
media-m
$media-m: $space-3;
Type
Value(px)
media-l
$media-l: $block;
Type
Value(px)
media-xl
$media-xl: $block-2;
Type
Value(px)
media-xxl
$media-xxl: $space-6;
Type
Value(px)
media-map
$media-map: (
xs: $media-xs,
s: $media-s,
m: $media-m,
l: $media-l,
xl: $media-xl,
xxl: $media-xxl
);
Map structure
keyName | keyDescription | keyType | keyValue |
---|---|---|---|
media-map.xs | —none | Value(px) | $meida-xs |
media-map.s | —none | Value(px) | $meida-s |
media-map.m | —none | Value(px) | $meida-m |
media-map.l | —none | Value(px) | $meida-l |
media-map.xl | —none | Value(px) | $meida-xl |
shadow
placeholders
shadow
%shadow { ... }
Description
Applies standard box-shadow
Example
@extend %shadow;
mixins
shadowOnHover
@mixin shadowOnHover($hasRestingShadow: false) { ... }
Description
Applies a drop shadow with slight motion on :hover and :focus
Parameters
parameterName | parameterDescription | parameterType | parameterDefault value |
---|---|---|---|
$hasRestingShadow | whether or not the element you're styling already has a shadow before hover | Boolean | false |
Example
@include shadowOnHover(); // default = true
// apply more shadow to an element that already has a shadow
@include shadowOnHover(true);
shape
mixins
circle
@mixin circle($color, $size) { ... }
Description
Makes selected element a circle with border-radius
Parameters
parameterName | parameterDescription | parameterType | parameterDefault value |
---|---|---|---|
$color | —none | Color | —none |
$size | in px | Value | —none |
Example
.myCircle {
@mixin circle(red, 20px);
}
string
functions
str-firstCharToUpper
@function str-firstCharToUpper($string) { ... }
Description
Capitalize first character in string
Parameters
parameterName | parameterDescription | parameterType | parameterDefault value |
---|---|---|---|
$string | string to capitalize | String | —none |
Returns
String
—capitalized string
Example
Capitalize function
str-firstCharToUpper('snowflake') // -> 'Snowflake'
.special#{str-firstCharToUpper('snowflake')} // -> .specialSnowflake
str-replace
@function str-replace($string, $search, $replace: '') { ... }
Description
Find and replace substring in a given string
Parameters
parameterName | parameterDescription | parameterType | parameterDefault value |
---|---|---|---|
$string | string to search | String | —none |
$search | substring to search in $string | String | —none |
$replace | replacement substring | String | '' |
Returns
String
Example
String replace
str-replace('inline-block', '-', '')
// -> 'inlineblock'
.display--#{str-replace('inline-block', '-block', 'Block')}
// -> .display--inlineBlock
typography
placeholders
text--pageTitle
%text--pageTitle { ... }
Description
Page title text placeholder
Requires
- [variable]
font-size-title
text--sectionTitle
%text--sectionTitle { ... }
Description
Section title text placeholder
Requires
- [variable]
font-size-big2
- [variable]
line-height
text--display1
%text--display1 { ... }
Description
Top level display text placeholder
Requires
- [variable]
font-size-display1
text--display2
%text--display2 { ... }
Description
Secondary level display text placeholder
Requires
- [variable]
font-size-display2
text--display3
%text--display3 { ... }
Description
Tertiary level display text placeholder
Requires
- [variable]
font-size-display3
text--secondary
%text--secondary { ... }
Description
Secondary (color) text
Requires
Used by
- [placeholder]
text--caption
text--tertiary
%text--tertiary { ... }
Description
Tertiary (color) text
Requires
Used by
- [placeholder]
text--hint
text--big
%text--big { ... }
Description
Big text
Requires
- [variable]
font-size-big
- [variable]
line-height-largeText
text--small
%text--small { ... }
Description
Small text
Requires
- [variable]
font-size-small
- [variable]
line-height-smallText
Used by
- [placeholder]
text--caption
text--tiny
%text--tiny { ... }
Description
Tiny text
Requires
- [variable]
font-size-tiny
- [variable]
line-height-smallText
text--hint
%text--hint { ... }
Description
Hint text
Requires
- [placeholder]
text--tertiary
text--link
%text--link { ... }
Description
Links placeholder
Requires
text--attention
%text--attention { ... }
Description
"Attention" text (errors, system messaging)
Requires
- [mixin]
color-all
text--mono
%text--mono { ... }
Description
Monospaced text
Requires
- [variable]
font--mono
text--disabled
%text--disabled { ... }
Description
Disabled text
Requires
wrapNice
%wrapNice { ... }
Description
Nice hyphenation for running text
variables
font--mono
$font--mono: Monaco, "Andale Mono", "Courier New", monospace;
Description
Mono font stack
Type
String
Used by
- [placeholder]
text--mono
font-size-tiny
$font-size-tiny: 12px;
Type
Value(px)
Used by
- [placeholder]
text--tiny
font-size-small
$font-size-small: 14px;
Type
Value(px)
Used by
- [mixin]
buttonBase
- [placeholder]
text--small
font-size
$font-size: 16px;
Type
Value(px)
font-size-tearsheet
$font-size-tearsheet: 24px;
Type
Value(px)
font-size-big2
$font-size-big2: 20px;
Type
Value(px)
Used by
- [placeholder]
text--sectionTitle
font-size-big
$font-size-big: 24px;
Type
Value(px)
Used by
- [placeholder]
text--big
font-size-title
$font-size-title: 32px;
Type
Value(px)
Used by
- [placeholder]
text--pageTitle
font-size-display3
$font-size-display3: 28px;
Type
Value(px)
Used by
- [placeholder]
text--display3
font-size-display2
$font-size-display2: 34px;
Type
Value(px)
Used by
- [placeholder]
text--display2
font-size-display1
$font-size-display1: 42px;
Type
Value(px)
Used by
- [placeholder]
text--display1
W_normal
$W_normal: 400;
Type
Number
W_medium
$W_medium: 500;
Type
Number
W_bold
$W_bold: 600;
Type
Number
line-height-largeText
$line-height-largeText: 1.1;
Type
String
Used by
- [placeholder]
text--big
line-height
$line-height: 1.45;
Type
String
Used by
- [placeholder]
text--sectionTitle
line-height-smallText
$line-height-smallText: 1.6;
Type
String
Used by
- [mixin]
buttonBase
- [placeholder]
text--small
- [placeholder]
text--tiny
line-height-runningText
$line-height-runningText: 1.8;
Type
String
width
mixins
width-columns
@mixin width-columns($nCols) { ... }
Description
Sets element width with calc
Parameters
parameterName | parameterDescription | parameterType | parameterDefault value |
---|---|---|---|
$nCols | —none | Int | —none |
Example
.myInlineblockList--3column > li {
@mixin width-columns(3);
}