Introducing a new way to review your PRs.

Read the announcement

ikrishg / reseter.css

The Modern CSS Reset 🚀

View on GitHub

9 documents · Updated Oct 12, 2026

docs / form-control-normalization

Form control normalization

Form control normalization gives buttons, fields, choice controls, and related elements shared browser-safe defaults. It keeps native behavior where useful while making dimensions, borders, text, focus, and state styling predictable for application styles.

Control defaults

The control defaults establish a common base for the main form elements. The full reset gives controls the inherited line height and a visible border that uses the current text color, so an application can style the group without first removing browser-specific differences. The rules apply to button, input, optgroup, select, and textarea in src/…/forms.scss.

The shared defaults are:

  • Inherit line height from the surrounding content.
  • Use a one-pixel border in the current color.
  • Keep small built-in padding for buttons, text inputs, and text areas.
  • Let custom application styles replace these low-specificity defaults.

References: src/…/forms.scss• L1-4 src/…/forms.scss• L6-9 src/…/forms.scss• L23-29

Button behavior

Button normalization preserves the expected native button role while removing browser differences that can affect layout and interaction. Button-like inputs use the same native appearance and receive a pointer cursor only when they are enabled, which prevents disabled controls from suggesting an available action.

The rules cover these button concerns:

  • Native button appearance for button and button-type inputs.
  • Visible overflow and normal text casing for buttons.
  • A pointer cursor for enabled buttons and button-type inputs.

References: src/…/forms.scss• L6-21

Field and choice controls

Text fields, selects, and text areas receive small corrections that make their content and browser state easier to style. Inputs allow visible overflow, selects keep normal text casing, and text areas use automatic overflow with top alignment. Search and color inputs also get targeted defaults so their special browser UI does not impose an unexpected base style.

These controls are normalized as follows:

ControlShared styling goal
Text inputKeep content visible and use a small, consistent padding value
SelectKeep normal text casing
Text areaStart content at the top and handle overflow predictably
Search inputUse a text-field appearance with a stable outline offset
Color inputInherit the surrounding background

References: src/…/forms.scss• L23-29 src/…/forms.scss• L48-64

Form structure and progress controls

Form structure elements support the same visual baseline as their controls. fieldset gets a defined border and a small browser-neutral margin, while legend can fit within its container and inherit its color. progress remains an inline control aligned with surrounding text.

This makes grouped fields and status controls easier to place inside an application layout without requiring browser-specific overrides. The rules do not define the application’s layout, colors, or progress value presentation.

References: src/…/forms.scss• L31-46

Browser-specific control states

The reset reduces browser-specific decoration without removing useful control feedback. Placeholder text inherits the control color with reduced opacity, search and file controls use a button-like native appearance where needed, and invalid controls do not add a browser-specific shadow. Focus-related rules retain an outline path for browsers that use their own focus model.

The normalization also keeps number-control spinners at their native height and removes an extra inner focus border in Firefox. Applications remain responsible for their final focus, validation, placeholder, and disabled-state design.

References: src/…/forms.scss• L66-92

Full reset relationship

Form control normalization is part of the full reset entrypoint. src/index.scss loads the global, text, form, and other rule groups in sequence, so consumers of the full stylesheet receive these control defaults together with the broader document normalization. The minimal variant in src/mini.scss does not include form-control rules and is intended for consumers that only need a smaller set of broad defaults; see Minimal reset variant.

The form rules complement the global box model and typography rules rather than replacing them. See Reset stylesheet composition, Foundational element normalization, and Typography normalization for the neighboring reset areas.

References: src/index.scss• L1-6 src/mini.scss• L1-34

Change checklist

When these files or sections are changed, remember to consider these:

  • Keep the form rule group included by the full entrypoint if consumers must receive control normalization.
  • Keep dist/index.css, its minified form, and the css/ aliases aligned with source changes made to the full reset.
  • Check browser-specific selectors when changing focus, placeholder, search, file, number, or validation behavior.
  • Preserve the distinction between the full reset and the minimal variant when adding a new control rule.

Important failure modes

TriggerConsequenceGuard
Form rules are omitted from the full entrypointConsumers get the global reset without the shared control baselineKeep src/index.scss linked to src/…/forms.scss
A control rule is added only to the source or only to a shipped aliasDifferent install paths produce different form behaviorRebuild and keep the full CSS artifacts synchronized
Enabled and disabled button selectors are changed togetherDisabled controls may show an action cursorKeep the :not(:disabled) condition on button-like selectors

Key files

FileWhy to read it
src/…/forms.scssDefines the form-control and interactive-element normalization rules.
src/index.scssShows how form normalization enters the full reset.
src/mini.scssShows the deliberately smaller variant that excludes form controls.
dist/index.cssShows the full reset as a consumer-facing stylesheet.
README.mdExplains the product goal and how consumers load the reset.