1.1 #Logic.Variables Variables
Variables are a way of storing small pieces of code to reuse in your stylesheet. Changing the variable's code value will update it everywhere the variable is used.
src/css/screen.scss
, line 19
1.1.1 #Logic.Variables.animation-duration Animation Duration
Controls how long animations play for. Make sure that your animations aren't
a trigger for seizure and photosensitive disorders, vertigo, and cognitive
concerns such as ADHD. You may also want to use a prefers-reduced-motion
media query
for people who have expressed a desire for less animation.
src/css/logic/_variables.animation-duration.scss
, line 1
src/css/logic/_variables.animation-duration.scss
, line 11
src/css/logic/_variables.animation-duration.scss
, line 19
src/css/logic/_variables.animation-duration.scss
, line 27
src/css/logic/_variables.animation-duration.scss
, line 35
src/css/logic/_variables.animation-duration.scss
, line 43
src/css/logic/_variables.animation-duration.scss
, line 51
1.1.2 #Logic.Variables.animation-easing Animation Easing
Controls how animations accelerate and decelerate. The easing terms communicate how elements on the page relate to each other.
Make sure that your animations don't flash, strobe, or have too great a
contrast between the static elements they are placed next to, so as to not
be a trigger for conditions such as vertigo and ADHD. You may also want to
use a prefers-reduced-motion
media query
for people who have expressed a desire for less animation.
src/css/logic/_variables.animation-easing.scss
, line 1
1.1.2.1 #Logic.Variables.animation-easing.animation-easing-character animation-easing-character
The main focus of the animated element.
src/css/logic/_variables.animation-easing.scss
, line 15
1.1.2.2 #Logic.Variables.animation-easing.animation-easing-dialogue animation-easing-dialogue
Sub-items the character may be animating.
src/css/logic/_variables.animation-easing.scss
, line 25
1.1.2.3 #Logic.Variables.animation-easing.animation-easing-background animation-easing-background
The background which a character is placed on. Can also apply to background elements and layout.
src/css/logic/_variables.animation-easing.scss
, line 35
src/css/logic/_variables.borders.scss
, line 8
src/css/logic/_variables.borders.scss
, line 16
src/css/logic/_variables.borders.scss
, line 24
src/css/logic/_variables.borders.scss
, line 32
src/css/logic/_variables.borders.scss
, line 40
src/css/logic/_variables.borders.scss
, line 48
src/css/logic/_variables.borders.scss
, line 56
1.1.4 #Logic.Variables.borders Borders
Controls how thick borders are.
src/css/logic/_variables.borders.scss
, line 1
1.1.5 #Logic.Variables.font-families Font Families
Font family variables are used to associate an imported typefaces with an abstract name. This allows us to be able to control and change typefaces quickly and easily. See font family utility classes.
src/css/logic/_variables.font-families.scss
, line 1
src/css/logic/_variables.font-families.scss
, line 10
src/css/logic/_variables.font-sizes.scss
, line 10
src/css/logic/_variables.font-families.scss
, line 18
src/css/logic/_variables.font-sizes.scss
, line 18
src/css/logic/_variables.font-families.scss
, line 26
src/css/logic/_variables.font-sizes.scss
, line 26
src/css/logic/_variables.font-families.scss
, line 34
src/css/logic/_variables.font-sizes.scss
, line 34
src/css/logic/_variables.font-sizes.scss
, line 42
src/css/logic/_variables.font-sizes.scss
, line 50
src/css/logic/_variables.font-sizes.scss
, line 58
src/css/logic/_variables.font-sizes.scss
, line 66
src/css/logic/_variables.font-sizes.scss
, line 74
src/css/logic/_variables.font-sizes.scss
, line 82
src/css/logic/_variables.font-sizes.scss
, line 90
src/css/logic/_variables.font-sizes.scss
, line 98
1.1.6 #Logic.Variables.font-sizes Font Families
Font family variables are used to control and keep a specific set of font sizes consistent. Font sizes are split into two type: body font sizes and heading font sizes.
src/css/logic/_variables.font-sizes.scss
, line 1
1.1.7 #Logic.Variables.font-tracking Font Tracking
Controls the spacing between letters, based off the set global type size.
src/css/logic/_variables.font-tracking.scss
, line 1
src/css/logic/_variables.font-tracking.scss
, line 8
src/css/logic/_variables.font-tracking.scss
, line 16
src/css/logic/_variables.font-tracking.scss
, line 24
src/css/logic/_variables.font-tracking.scss
, line 32
src/css/logic/_variables.font-tracking.scss
, line 40
src/css/logic/_variables.font-tracking.scss
, line 48
src/css/logic/_variables.font-tracking.scss
, line 56
1.1.8 #Logic.Variables.font-weights Font Weights
These variables control the thickness of the characters for each typeface. It is important to make sure your font weight isn't too thin, as it may make your content too difficult to see for people experiencing low vision conditions.
src/css/logic/_variables.font-weights.scss
, line 1
src/css/logic/_variables.font-weights.scss
, line 19
src/css/logic/_variables.font-weights.scss
, line 27
src/css/logic/_variables.font-weights.scss
, line 35
src/css/logic/_variables.font-weights.scss
, line 43
src/css/logic/_variables.font-weights.scss
, line 51
src/css/logic/_variables.font-weights.scss
, line 59
src/css/logic/_variables.font-weights.scss
, line 67
src/css/logic/_variables.font-weights.scss
, line 75
src/css/logic/_variables.font-weights.scss
, line 83
src/css/logic/_variables.font-weights.scss
, line 91
src/css/logic/_variables.font-weights.scss
, line 99
src/css/logic/_variables.font-weights.scss
, line 107
src/css/logic/_variables.font-weights.scss
, line 11
src/css/logic/_variables.font-weights.scss
, line 115
src/css/logic/_variables.font-weights.scss
, line 123
src/css/logic/_variables.font-weights.scss
, line 131
src/css/logic/_variables.font-weights.scss
, line 139
src/css/logic/_variables.font-weights.scss
, line 147
1.1.9 #Logic.Variables.Global Global
Variables used to control initial, document-level settings.
src/css/logic/_variables.global.scss
, line 1
1.1.9.1 #Logic.Variables.Global.global-bleed global-bleed
Sets the outermost spacing area for content and the browser viewport.
src/css/logic/_variables.global.scss
, line 8
1.1.9.1 #Logic.Variables.Global.global-bleed global-grid-columns
Controls the grid template column sizes of the main content area.
src/css/logic/_variables.global.scss
, line 19
1.1.9.2 #Logic.Variables.Global.global-post-columns global-post-columns
Map that sets the grid column widths for posts.
src/css/logic/_variables.global.scss
, line 27
1.1.9.3 #Logic.Variables.Global.global-post-content-inset global-post-content-inset
Map that sets the distance of post content from the lefthand side of the viewport.
src/css/logic/_variables.global.scss
, line 39
1.1.9.4 #Logic.Variables.Global.global-sponsor-width global-sponsor-width
Sets the widths for sponsor ads.
src/css/logic/_variables.global.scss
, line 52
1.1.9.5 #Logic.Variables.Global.global-type-measure global-type-measure
Sets the maximum width for large amounts of text content.
src/css/logic/_variables.global.scss
, line 78
1.1.9.6 #Logic.Variables.Global.global-type-scale global-type-scale
Sets the ratio used for modular scale calculation. See functions.ms
.
src/css/logic/_variables.global.scss
, line 70
1.1.9.7 #Logic.Variables.Global.global-type-size global-type-size
Sets the initial document font size in pixels. Used for things like em
and rem
calculation. See functions.em
and functions.rem
.
src/css/logic/_variables.global.scss
, line 60
1.1.10 #Logic.Variables.line-heights Line Heights
Controls how far apart lines of text are.
For body text, the WCAG requires a line height percentage of 150 or higher. This aids with legibility and covers a large degree of accessibility concerns, including low vision conditions, cognitive considerations such as dyslexia, and language and learning disabilities.
It is improtant to keep line heights unitless, so the ratio they describe will be maintained if a person increases the font size.
src/css/logic/_variables.line-heights.scss
, line 1
src/css/logic/_variables.line-heights.scss
, line 16
src/css/logic/_variables.line-heights.scss
, line 24
src/css/logic/_variables.line-heights.scss
, line 32
src/css/logic/_variables.line-heights.scss
, line 40
src/css/logic/_variables.line-heights.scss
, line 48
src/css/logic/_variables.line-heights.scss
, line 56
src/css/logic/_variables.line-heights.scss
, line 64
1.1.11 #Logic.Variables.Paths Paths
Variables used to point to different kinds of resources.
src/css/logic/_variables.paths.scss
, line 1
src/css/logic/_variables.paths.scss
, line 8
src/css/logic/_variables.paths.scss
, line 14
src/css/logic/_variables.paths.scss
, line 20
src/css/logic/_variables.paths.scss
, line 26
1.1.12 #Logic.Variables.Supports Supports
Variables used to ensure @supports declarations are standardized.
src/css/logic/_variables.supports.scss
, line 1
src/css/logic/_variables.supports.scss
, line 9
src/css/logic/_variables.supports.scss
, line 15
src/css/logic/_variables.supports.scss
, line 21
src/css/logic/_variables.supports.scss
, line 33
src/css/logic/_variables.supports.scss
, line 27
1.2 #Logic.Maps Maps
Maps are collections of related values contained in a variable.
src/css/screen.scss
, line 40
1.2.1 #Logic.Maps.breakpoints breakpoints
Organizes the site breakpoints. Breakpoints are declared with pixel values to work with the Mappy Breakpoints mixin.
Breakpoint names are based on the ergonomics of how people position themselves around their devices, to help keep usability top-of-mind.
src/css/logic/_maps.breakpoints.scss
, line 1
1.2.2 #Logic.Maps.z-index z-index
Organizes the stacking order for items assigned a z-index
value. See functions.z
src/css/logic/_maps.z-index.scss
, line 1
1.3 #Logic.Functions Functions
Functions allow you to use conditional logic for your CSS values.
src/css/screen.scss
, line 50
1.3.1 #Logic.Functions.em em
Generates an em
value from a pixel measurement, derived from the base type
size.
-
$pixels
The desired pixel value. -
$context
The font size to derive theem
value from. Defaults to$global-type-size
.
src/css/logic/_functions.em.scss
, line 1
1.3.2 #Logic.Functions.modular-scale ms
Generates a size value from a modular scale. Defaults to the global type size and ratio.
-
$increment
The number to multiply the modular scale by. -
$base-size
The base type size to multiply the modular scale by. Defaults to$global-type-size
. -
$ratio
The number used to construct the modular scale. Defaults to$global-type-scale
.
src/css/logic/_functions.modular-scale.scss
, line 1
1.3.3 #Logic.Functions.rem rem
Generates a rem
value from a pixel measurement, derived from the base type
size.
-
$pixels
The desired pixel value. -
$context
The font size to derive theem
value from. Defaults to$global-type-size
.
src/css/logic/_functions.rem.scss
, line 1
1.3.4 #Logic.Functions.strip-unit strip-unit
Removes the unit from a measurement, transforming it into a number.
-
$number
The measurement value that will have its unit stripped. Must include a valid CSS unit.
src/css/logic/_functions.strip-unit.scss
, line 1
1.3.5 #Logic.Functions.z z
Calls a z-index value from the z-index map. Used to create a terse, yet managed system of z-index declarations.
-
$index
The name of the z-index value you want to use. Seemaps.z-index
src/css/logic/_functions.z.scss
, line 1
1.4 #Logic.Mixins Mixins
Mixins let you repeat groups of CSS declarations across your stylesheet. They also let you use conditional logic to adjust what is declared.
src/css/screen.scss
, line 64
1.4.1 #Logic.Mixins.clearfix clearfix
Applies a clearfix hack.
-
$add-or-remove
Accepts eitheradd
orremove
as an argument.
src/css/logic/_mixins.clearfix.scss
, line 1
1.4.2 #Logic.Mixins.color-scheme color-scheme
Generates color scheme CSS property values for both dark mode and light mode
$name: Color scheme string name used in a layout file $scheme-light: SCSS color scheme map for light mode $scheme-dark: SCSS color scheme map for dark mode
src/css/logic/_mixins.color-scheme.scss
, line 2
1.4.3 #Logic.Mixins.dark-mode dark-mode
Generates dark mode related CSS based on the user settings, Outputs the entire content of the mixin under scopes
src/css/logic/_mixins.dark-mode.scss
, line 2
1.4.4 #Logic.Mixins.Headings Headings
Controls section content headings.
src/css/logic/_mixins.headings.scss
, line 1
1.4.4.1 #Logic.Mixins.Headings.heading-largest heading-largest
Applies the third level heading style from a set of 8 heading styles.
Used for h1
elements in generic page temlplates.
src/css/logic/_mixins.headings.scss
, line 8
1.4.4.2 #Logic.Mixins.Headings.heading-large heading-large
Applies the fourth level heading style from a set of 8 heading styles.
Used for h2
elements in blog posts.
src/css/logic/_mixins.headings.scss
, line 28
1.4.4.3 #Logic.Mixins.Headings.heading-medium heading-medium
Applies the fifth level heading style from a set of 8 heading styles.
Used for h3
elements in blog posts.
src/css/logic/_mixins.headings.scss
, line 45
1.4.4.3 #Logic.Mixins.Headings.heading-medium heading-small
Applies the sixth level heading style from a set of 8 heading styles.
Used for h4
elements in blog posts.
src/css/logic/_mixins.headings.scss
, line 63
1.4.5 #Logic.Mixins.hide hide
Removes content from the page using four different techniques.
-
$how
Specifies which kind of technique used to hide content. Acceptsvisually
,invisible
,hidden
, orremove
as an argument. Defaults tovisually
.
src/css/logic/_mixins.hide.scss
, line 1
1.4.5 #Logic.Mixins.hide show
Reveals hidden content using four different techniques. This mixin is useful for revealing content that has been hidden on a different breakpoint.
If you have to hide content, make sure that its message or functionality is still preserved.
-
$how
Specifies which kind of technique used to hide content. Acceptsvisually
,invisible
,hidden
, orremove
as an argument. Defaults tovisually
.
src/css/logic/_mixins.show.scss
, line 1
1.4.6 #Logic.Mixins.lede lede
The lede is the opening sentence or paragraph of a news article, summarizing
the most important aspects of the story. The lede()
mixin allows us to
style paragraphs even if they are not the first p
element present on the
page.
src/css/logic/_mixins.lede.scss
, line 1
1.4.7 #Logic.Mixins.link-states link-states
Generates link color and hover and focus states.
-
$link-color
Specifies what color to use for link styling.
src/css/logic/_mixins.link-states.scss
, line 1
1.4.8 #Logic.Mixins.post-content-inset post-content-inset
Controls left and right margins for post content.
-
$size
Specifies the size of the left and right margins. Acceptssmall
,medium
, orlarge
.
src/css/logic/_mixins.content-inset.scss
, line 1
1.4.8 #Logic.Mixins.post-content-inset post-content-flourish
Adds images to specific section s of post content
-
$height
Specifies the height of the background image container in pixels. Converted torem
. -
$top-margin
Sets the amount of top margin.
src/css/logic/_mixins.post-content-flourish.scss
, line 1
1.4.8 #Logic.Mixins.post-content-inset post-content-inset
Controls left and right margins for post content.
-
$size
Specifies the size of the left and right margins. Acceptssmall
,medium
, orlarge
.
src/css/logic/_mixins.post-content-inset.scss
, line 1
1.4.9 #Logic.Mixins.preserve-list-semantics preserve-list-semantics
Ensures that VoiceOver will declare the presence of list items,
even if the list bullet has been removed. Apply to the ul
, ol
, dl
element. See u-preserve-list-semantics
.
src/css/logic/_mixins.preserve-list-semantics.scss
, line 1
1.4.10 #Logic.Mixins.responsify responsify
Creates a basic full-width responsive element whose aspect ratio scales
proportionately. See u-responsify
.
src/css/logic/_mixins.responsify.scss
, line 1
1.4.11 #Logic.Mixins.shift-click shift-click
Shift interactive elements down slightly when activated to make them feel more button-like.
src/css/logic/_mixins.shift-click.scss
, line 1
1.4.12 #Logic.Mixins.var var
Generates a property + CSS custom property with a fallback for IE 11. Modified from this post: https://vgpena.github.io/winning-with-css-variables/
$property: The CSS property to modify $varName: The scoped variable name to look up
src/css/logic/_mixins.var.scss
, line 1