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 intypography/title, not in user-agent defaults. - Drops list bullets on
ul(re-add withlist-styleper use site). - Sets
margin: 0on form controls (button,input,select,textarea). - Applies
box-sizing: border-boxonhtmland inherits it everywhere. - Constrains media (
img,video) withheight: auto; max-width: 100%;so they shrink to their container. - Removes the default
borderoniframe. - Collapses
tableborders and zeroestd/thpadding, with analign="left"default for cells lacking an explicit[align].
Usage
@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
| Variable | Default | Notes |
|---|---|---|
$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
@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.