--- title: 'Styleguide' permalink: /styleguide/ --- {% extends 'layouts/base.njk' %} {# Intro content #} {% set introHeading = title %} {% block head %} {% endblock %} {% block content %}
{% include "partials/components/intro.njk" %}

Colours

Colour swatches with various values that you can copy.

    {% for color in styleguide.colors() %}
  • {{ color.key }}

    Value
    {{ color.value }}
    Sass function
    get-color('{{ color.key }}')
    Custom Property
    var(--color-{{ color.key }})
    Text util class
    color-{{ color.key }}
    Background util class
    bg-{{ color.key }}
  • {% endfor %}

Fonts

Base — System stack

.font-base

Serif — Lora

.font-serif

Text sizes

Text sizes are available as standard classes or media query prefixed, such as lg:text-500.

{% for size in styleguide.sizes() %}

{{ size.value }} - text-{{ size.key }}

{% endfor %}

Spacing

There’s size ratio utilities that give you margin (gap-top, gap-bottom) and padding (pad-top, pad-left, pad-bottom).

Margin

Margin token classes that you can copy

{% for size in styleguide.sizes() %}
gap-top-{{ size.key }}
{% endfor %}

Padding

Padding token classes that you can copy

{% for size in styleguide.sizes() %}
pad-top-{{ size.key }}
pad-bottom-{{ size.key }}
pad-left-{{ size.key }}
{% endfor %}

Forms

{% from "macros/form.njk" import label, field, textarea, confirm, select, radios, checkboxes, hidden_field, button %}
  1. {{ label("Text Label", "field-text-name") }} {{ field( "text", "field-text-name", { required: true, placeholder: "Katherine Johnson", autocomplete: "name", autocorrect: "off", autocapitalize: "off", description: "Optional description. Note: This field type can take any valid input type." } ) }}
  2. {{ label("Email Label", "field-email-name") }} {{ field( "email", "field-email-name", { required: true, placeholder: "katherine@johnson.tld", autocomplete: "email" } ) }}
  3. {{ label("Textarea Label", "field-textarea-name") }} {{ textarea( "field-textarea-name", { required: true, autocapitalize: "sentences", spellcheck: "true" } ) }}
  4. {{ label("Select Label", "field-select-name") }} {{ select( "select", [ "option 1", {label: "Option II", value: "option 2"} ], { required: true, options_before: ["prepended option"], options_after: ["appended option"], description: "Optional description." } ) }}
  5. {{ confirm("Confirm this statement", "confirm") }}
  6. {{ radios("Radio Legend", "field-radio-name", [ "Yes", { label: "Not really", value: "No", note: "Note about choice." } ], { description: "Optional description." } ) }}
  7. {{ checkboxes("Checkbox Legend", "field-checkbox-name", [ "Choice 1", { label: "Choice 2", value: "Choice 2", note: "Note about choice." }, "Choice 3" ], { description: "Optional description." } ) }}
  8. There is a hidden field here… {{ hidden_field("hidden-name", "hidden-value") }}
{{ button("Button Text") }}
{% endblock %}