Styleguide

Forms

Covers styles used for forms, such as the <input> and <select> elements.

Text Input

Below are the text-oriented form elements used on the site.

2.1.1 Single-Line Text Boxes

Your standard, everyday text boxes.

  • :hover -

    Highlight the text box when hovering

  • :focus -

    Similar to :hover, however it should demand more attention than when an input is simply hovered.

  • :disabled -

    When disabled, the input's appearance should reflect as such.

:hover
:focus
:disabled
<input type="text" class="{$modifiers}" value="Text"/>

2.1.2 Label/Textbox Pairs

All labelled textboxes should be included in a wrapper <div> element for both layout convenience and specific styling.

  • .disabled -

    To be used when the text input inside is expected to be disabled.

  • .invalid -

    To be used if the input has failed a validation check.

  • .valid -

    To be used if the input has passed a validation check (intended for live validation in particular).

.disabled
.invalid
.valid
<div class="mod-input text {$modifiers}">
    <label>Text Label</label>
    <input type="text" value="Text Input"/>
</div>