Skip to content

Instantly share code, notes, and snippets.

@klepas
Last active February 18, 2017 10:33
Show Gist options
  • Save klepas/d758e15b655b7356b3c8550bc22738ee to your computer and use it in GitHub Desktop.
Save klepas/d758e15b655b7356b3c8550bc22738ee to your computer and use it in GitHub Desktop.
CSS tests we may want to implement for UI-Kit 2.x

Tests

  • whitespace between ‘modules’/components
  • maintaining horizontal spacing (eg typographic indents)
  • image sizing (with varying w:h ratios) across varying breakpoints
  • logo sizes, esp. at specific breakpoints
  • checking nested content styles, esp. when expanding the .gov-speak typography classes
  • icon alignment
  • table styling and behaviour at varying breakpoints, esp. with more complex tables
  • visibility and placement of menu buttons, etc. for interactive components at varying breakpoints
  • consistent styling for :hover, :focus, and :active across links, buttons, and more
  • link/anchor styling edge cases, eg. images as anchors, etc.
  • check background colours for certain components (eg white bg for logos in header)
  • check for overflows/wrapping, esp. with lists of inline links
  • (?) colour inversions (eg .foo--inverted)
  • (?) test font stacks (inc. serifs)
  • (?) test for correct usage of global and local vars

interactive/js

  • text input styling, eg. monospace for certain things, readable line-heights in free form text boxes, etc.
  • ensure menus and accordions can expand/collapse
  • ensure nothing introduces a horizontal scroll for the viewport

a11y

  • .visuallyHidden things, eg. skip link styling (prolly also contrast exception?)
  • pa11y basics (eg colour contrast 4.5:1 min., etc.)
  • ensure type does not go under a certain font size, eg reduction as a result of nesting
  • links/button styling and depending on usage/roles, eg colour, disabled state (cursor disabled), etc.

browser stuff

  • usage of flexbox and other grid-setting styles wrt. browser support
  • ie overrides and other hacks

other?

  • (?) apply rigorous rules for when we create specific templates
  • linting
  • adhering to BEM conventions
  • (?) observing selector semantics?
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment