asw/openspec/specs/framework/forms/spec.md
Ludo 5bf233348d
feat: add OpenSpec specs and changes for ASW restructure
Specs: repo-structure, 10 framework layer specs, packs, site.
Changes: repo-restructure (10 tasks), css-refactor (12 tasks),
legacy-import (proposal + triage categories).

Supersede docs/css-refactor-plan.md in favor of OpenSpec change.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-11 14:58:39 +02:00

931 B

Spec: Forms (Layer 04)

File: src/layers/04-forms.css

Purpose

Form element styling. Inputs, selects, textareas, buttons, checkboxes, radios, fieldsets, labels. Accessible by default.

Scope

In scope

  • button, input[type="button"], input[type="submit"], input[type="reset"]
  • input[type="text|email|password|number|search|url|tel|date|time|datetime-local"]
  • select, textarea
  • fieldset, legend, label
  • input[type="checkbox"], input[type="radio"]
  • progress, meter
  • :focus-visible ring styling
  • aria-invalid, aria-busy states
  • [disabled] styling

Out of scope

  • Form layout/grid (→ layouts layer)
  • Custom form components built with data-attributes (→ data-attributes layer)

Constraints

  • References only semantic aliases from 01-tokens.css
  • All interactive elements must have visible focus indicators
  • Respects prefers-color-scheme and prefers-contrast