OddSite 4.0.0

Form Fields & Inputs

textarea

scss
textarea {
  min-height: calc(6em + 4vw);
  resize: vertical;
}

select

scss
select {
  font: inherit;
  font-size: var(--xsmall);
  width: 100%;
}

fieldset

scss
fieldset {
  border-color: var(--border-fade);
  margin: 0 0 var(--newline);
  padding: var(--shim);
}

legend

scss
legend {
  font-size: var(--xsmall);
  padding: 0 var(--shim);
}

[data-field], [data-fieldset]

scss
[data-field],
[data-fieldset] {
  display: var(--ccs-custom-display, block);
  margin-bottom: var(--shim);
}

Form fields (using the label for markup) are set to block display, with a margin.

[data-label]

scss
[data-label] {
  @include tools.font-family('alt');
  display: block;
}

Form label text uses a span inside the wrapper label and is displayed above the input.

[data-input*='text']

scss
[data-input*='text'] {
  background-color: var(--bg-full);
  border: thin solid var(--border);
  border-radius: 0;
  color: var(--text);
  display: block;
  font: inherit;
  font-size: var(--xsmall);
  padding: var(--half-shim);
  width: 100%;

  &:focus {
    border-color: var(--action);
    outline: medium solid var(--action);
    outline-offset: 0;
  }
}

Varioius input “types” all rely on the same basic text-input style.

.form-actions

scss
.form-actions {
  margin-top: var(--newline);
}

A wrapper element to provide layout and spacing of the actions at the end of a form.

[data-honey]

scss
[data-honey] {
  @include tools.is-hidden;
}

Apply to honey-pot SPAM-protection fields…