Reset

Strips browser defaults to a predictable starting point: zeroed margins and padding on text-flow elements, no list bullets, normalised heading weight, border-box sizing globally, fluid media. Derived from minireset.css.

What it does

  • Sets margin: 0; padding: 0; on the text-flow selector list (html, body, paragraphs, headings, lists, blockquote, figure, fieldset, legend, textarea, pre, iframe, hr).
  • Normalises headings to font-size: 100%; font-weight: normal; so type scale lives in typography/title, not in user-agent defaults.
  • Drops list bullets on ul (re-add with list-style per use site).
  • Sets margin: 0 on form controls (button, input, select, textarea).
  • Applies box-sizing: border-box on html and inherits it everywhere.
  • Constrains media (img, video) with height: auto; max-width: 100%; so they shrink to their container.
  • Removes the default border on iframe.
  • Collapses table borders and zeroes td/th padding, with an align="left" default for cells lacking an explicit [align].

Usage

app.scss
@use '@adnap/krysalicss/base/reset';

The reset is enabled by default when you @use '@adnap/krysalicss';. Disable it with the feature flag:

@use '@adnap/krysalicss' with ($feature-list: (
  // ... everything you want, omitting `base-reset`
));

Variables

VariableDefaultNotes
$selector-list'html, body, p, ol, ul, li, dl, dt, dd, blockquote, figure, fieldset, legend, textarea, pre, iframe, hr, h1, h2, h3, h4, h5, h6'Targets of the margin: 0; padding: 0; rule.
$heading-selector'h1, h2, h3, h4, h5, h6'Targets of the heading-normalisation rule (font-size: 100%; font-weight: normal;).
$form-selector'button, input, select, textarea'Form controls that get margin: 0.
$media-selector'img, video'Media constrained to height: auto; max-width: 100%;. Add picture, svg here if your design needs them.

Override example

app.scss
@use '@adnap/krysalicss/base/reset' with (
  $selector-list: 'html, body, p, h1, h2, h3, h4, h5, h6, ul, ol',
  $media-selector: 'img, video, picture, svg',
);

When to disable

  • You already ship another reset (Normalize, Modern Reset, sanitize.css) and don't want a double pass.
  • Your project intentionally relies on user-agent defaults for prose (e.g. a long-form blog where you'd rather inherit the browser's paragraph spacing).
  • You're scoping the framework into a shadow root and want the host document's defaults preserved outside.

In all other cases keep base-reset on: every other component assumes zeroed margins and border-box sizing.