NachoDS v0.1.0
Web DS · Library

Components

Each component is a live preview, the rules for using it, and the markup to copy. Their styles live in /styles/system.css.

Buttons

A button starts an action. A link that only navigates stays a link.

VariantClassUse
Primary.buttonThe one action a view exists for; at most one per view
Secondary.button.button--secondaryEvery other action beside or below the primary
<button class="button" type="button">Primary action</button>
<button class="button button--secondary" type="button">Secondary</button>

Form fields

A field is a label, a control, and optional help text, in that order.

Keep help text close to the control.
PartElementRule
LabellabelAlways visible and tied to the control with for; a placeholder is not a label
ControlinputAt least 3rem tall so it is easy to hit on touch screens
Help textsmallOne sentence directly under the control
<div class="field">
  <label for="email">Email address</label>
  <input id="email" type="email">
  <small>Keep help text close to the control.</small>
</div>

Site layout

The pieces a whole page is composed from. The website design under Designs uses only these and the components above, so a page needs nothing a product does not already get from /styles/system.css.

PieceClassUse
Wrap.wrapCenters a band of the page at the content width with side gutters; the header, main content, and footer each sit in one
Site header.site-header, .site-header__brand, .site-navThe brand link and the site navigation at the top of every page
Hero.heroThe opening band: one heading, one paragraph, then the actions
Section.sectionEach further band of a page, with a heading and short copy; give it an id so the page can link to it
Form.formStacks fields and their submit button
Notice.noticeA confirmation or status message in its own panel
Site footer.site-footerThe closing line of every page