Styleguide - The A11Y Project

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.

Source: 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.

Source: src/css/logic/_variables.animation-duration.scss, line 1
Source: src/css/logic/_variables.animation-duration.scss, line 11
Source: src/css/logic/_variables.animation-duration.scss, line 19
Source: src/css/logic/_variables.animation-duration.scss, line 27
Source: src/css/logic/_variables.animation-duration.scss, line 35
Source: src/css/logic/_variables.animation-duration.scss, line 43
Source: 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.

Source: src/css/logic/_variables.animation-easing.scss, line 1
Source: src/css/logic/_variables.animation-easing.scss, line 15
Source: 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.

Source: src/css/logic/_variables.animation-easing.scss, line 35
Source: src/css/logic/_variables.borders.scss, line 8
Source: src/css/logic/_variables.borders.scss, line 16
Source: src/css/logic/_variables.borders.scss, line 24
Source: src/css/logic/_variables.borders.scss, line 32
Source: src/css/logic/_variables.borders.scss, line 40
Source: src/css/logic/_variables.borders.scss, line 48
Source: src/css/logic/_variables.borders.scss, line 56

1.1.4 #Logic.Variables.borders Borders

Controls how thick borders are.

Source: 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.

Source: src/css/logic/_variables.font-families.scss, line 1
Source: src/css/logic/_variables.font-families.scss, line 10
Source: src/css/logic/_variables.font-sizes.scss, line 10
Source: src/css/logic/_variables.font-families.scss, line 18
Source: src/css/logic/_variables.font-sizes.scss, line 18
Source: src/css/logic/_variables.font-families.scss, line 26
Source: src/css/logic/_variables.font-sizes.scss, line 26
Source: src/css/logic/_variables.font-families.scss, line 34
Source: src/css/logic/_variables.font-sizes.scss, line 34
Source: src/css/logic/_variables.font-sizes.scss, line 42
Source: src/css/logic/_variables.font-sizes.scss, line 50
Source: src/css/logic/_variables.font-sizes.scss, line 58
Source: src/css/logic/_variables.font-sizes.scss, line 66
Source: src/css/logic/_variables.font-sizes.scss, line 74
Source: src/css/logic/_variables.font-sizes.scss, line 82
Source: src/css/logic/_variables.font-sizes.scss, line 90
Source: 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.

Source: 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.

Source: src/css/logic/_variables.font-tracking.scss, line 1
Source: src/css/logic/_variables.font-tracking.scss, line 8
Source: src/css/logic/_variables.font-tracking.scss, line 16
Source: src/css/logic/_variables.font-tracking.scss, line 24
Source: src/css/logic/_variables.font-tracking.scss, line 32
Source: src/css/logic/_variables.font-tracking.scss, line 40
Source: src/css/logic/_variables.font-tracking.scss, line 48
Source: 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.

Source: src/css/logic/_variables.font-weights.scss, line 1
Source: src/css/logic/_variables.font-weights.scss, line 19
Source: src/css/logic/_variables.font-weights.scss, line 27
Source: src/css/logic/_variables.font-weights.scss, line 35
Source: src/css/logic/_variables.font-weights.scss, line 43
Source: src/css/logic/_variables.font-weights.scss, line 51
Source: src/css/logic/_variables.font-weights.scss, line 59
Source: src/css/logic/_variables.font-weights.scss, line 67
Source: src/css/logic/_variables.font-weights.scss, line 75
Source: src/css/logic/_variables.font-weights.scss, line 83
Source: src/css/logic/_variables.font-weights.scss, line 91
Source: src/css/logic/_variables.font-weights.scss, line 99
Source: src/css/logic/_variables.font-weights.scss, line 107
Source: src/css/logic/_variables.font-weights.scss, line 11
Source: src/css/logic/_variables.font-weights.scss, line 115
Source: src/css/logic/_variables.font-weights.scss, line 123
Source: src/css/logic/_variables.font-weights.scss, line 131
Source: src/css/logic/_variables.font-weights.scss, line 139
Source: src/css/logic/_variables.font-weights.scss, line 147

1.1.9 #Logic.Variables.Global Global

Variables used to control initial, document-level settings.

Source: 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.

Source: 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.

Source: src/css/logic/_variables.global.scss, line 19
Source: 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.

Source: src/css/logic/_variables.global.scss, line 39
Source: 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.

Source: 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.

Source: 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.

Source: 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.

Source: src/css/logic/_variables.line-heights.scss, line 1
Source: src/css/logic/_variables.line-heights.scss, line 16
Source: src/css/logic/_variables.line-heights.scss, line 24
Source: src/css/logic/_variables.line-heights.scss, line 32
Source: src/css/logic/_variables.line-heights.scss, line 40
Source: src/css/logic/_variables.line-heights.scss, line 48
Source: src/css/logic/_variables.line-heights.scss, line 56
Source: 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.

Source: src/css/logic/_variables.paths.scss, line 1
Source: src/css/logic/_variables.paths.scss, line 8
Source: src/css/logic/_variables.paths.scss, line 14
Source: src/css/logic/_variables.paths.scss, line 20
Source: src/css/logic/_variables.paths.scss, line 26

1.1.12 #Logic.Variables.Supports Supports

Variables used to ensure @supports declarations are standardized.

Source: src/css/logic/_variables.supports.scss, line 1
Source: src/css/logic/_variables.supports.scss, line 9
Source: src/css/logic/_variables.supports.scss, line 15
Source: src/css/logic/_variables.supports.scss, line 21
Source: src/css/logic/_variables.supports.scss, line 33
Source: src/css/logic/_variables.supports.scss, line 27

1.2 #Logic.Maps Maps

Maps are collections of related values contained in a variable.

Source: 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.

Source: 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

Source: 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.

Source: 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.

Parameters:
  • $pixels
    The desired pixel value.
  • $context
    The font size to derive the em value from. Defaults to $global-type-size.
Source: 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.

Parameters:
  • $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.
Source: 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.

Parameters:
  • $pixels
    The desired pixel value.
  • $context
    The font size to derive the em value from. Defaults to $global-type-size.
Source: 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.

Parameters:
  • $number
    The measurement value that will have its unit stripped. Must include a valid CSS unit.
Source: 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.

Parameters:
  • $index
    The name of the z-index value you want to use. See maps.z-index
Source: 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.

Source: src/css/screen.scss, line 64

1.4.1 #Logic.Mixins.clearfix clearfix

Applies a clearfix hack.

Parameters:
  • $add-or-remove
    Accepts either add or remove as an argument.
Source: 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

Source: 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

Source: src/css/logic/_mixins.dark-mode.scss, line 2

1.4.4 #Logic.Mixins.Headings Headings

Controls section content headings.

Source: 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.

Source: 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.

Source: 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.

Source: 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.

Source: src/css/logic/_mixins.headings.scss, line 63

1.4.5 #Logic.Mixins.hide hide

Removes content from the page using four different techniques.

Parameters:
  • $how
    Specifies which kind of technique used to hide content. Accepts visually, invisible, hidden, or remove as an argument. Defaults to visually.
Source: 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.

Parameters:
  • $how
    Specifies which kind of technique used to hide content. Accepts visually, invisible, hidden, or remove as an argument. Defaults to visually.
Source: 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.

Source: src/css/logic/_mixins.lede.scss, line 1

1.4.8 #Logic.Mixins.post-content-inset post-content-inset

Controls left and right margins for post content.

Parameters:
  • $size
    Specifies the size of the left and right margins. Accepts small, medium, or large.
Source: 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

Parameters:
  • $height
    Specifies the height of the background image container in pixels. Converted to rem.
  • $top-margin
    Sets the amount of top margin.
Source: 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.

Parameters:
  • $size
    Specifies the size of the left and right margins. Accepts small, medium, or large.
Source: 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.

Source: 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.

Source: 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.

Source: 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

Source: src/css/logic/_mixins.var.scss, line 1