UNPKG

noicss.reset

Version:

reset / normalize by noicss. In modern vanilla CSS.

242 lines (230 loc) 4.26 kB
/* stylelint-disable color-named */ /* stylelint-disable property-no-vendor-prefix */ @property --accentColor { syntax: "<color>"; inherits: true; initial-value: magenta; } @property --outlineColor { syntax: "<color>"; inherits: true; initial-value: magenta; } @property --caretColor { syntax: "<color>"; inherits: true; initial-value: magenta; } @property --highlightedTextColor { syntax: "<color>"; inherits: true; initial-value: currentcolor; } @property --highlightedTextBgColor { syntax: "<color>"; inherits: true; initial-value: magenta; } :root { --highlightedTextBgColor: var(--accentColor); --outlineColor: var(--accentColor); --caretColor: var(--accentColor); } @supports (view-transition-name: custom-ident) { @view-transition { navigation: auto; } } *, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; overflow-wrap: break-word; border: none; @supports (transition-behavior: allow-discrete) { /* used to transition from display: none; to display: block; */ transition-behavior: allow-discrete; } @supports (interpolate-size: allow-keywords) { /* used to transition from height: 0; to height: auto; without using the calc-size() function */ interpolate-size: allow-keywords; } } * { &:focus-visible { outline: 2px solid var(--outlineColor); outline-offset: 2px; } &::selection, &::target-text { color: var(--highlightedTextColor); background-color: var(--highlightedTextBgColor); } &[contenteditable] { caret-color: var(--caretColor); } } html { color-scheme: light dark; font-size: 100%; line-height: 1.5; -moz-tab-size: 4; tab-size: 4; accent-color: var(--accentColor); scroll-behavior: smooth; -webkit-text-size-adjust: 100%; -webkit-font-smoothing: antialiased; } body { margin: 0; } h1, h2, h3, h4, h5, h6, p, span { overflow-wrap: break-word; } hr { height: 0; color: inherit; } abbr[title] { text-decoration: underline dotted; } b, strong { font-weight: bolder; } code, kbd, pre, samp { font-family: Hack, ui-monospace, SFMono-Regular, Consolas, "Liberation Mono", Menlo, monospace; font-size: 1em; } small { font-size: 80%; } sub, sup { vertical-align: baseline; position: relative; font-size: 75%; line-height: 0; } sub { bottom: -0.25em; } sup { top: -0.5em; } table { text-indent: 0; border-color: inherit; } [type="button"], [type="reset"], [type="submit"], button, input, textarea, select, optgroup, option { margin: 0; font: inherit; letter-spacing: inherit; word-spacing: inherit; @supports (field-sizing: content) { field-sizing: content; } } input, textarea { min-width: 0; caret-color: var(--caretColor); } [type="text"], [type="search"], textarea, *[contenteditable] { @supports selector(*::spelling-error) { &::spelling-error { text-decoration: from-font red wavy underline; } } @supports selector(*::grammar-error) { &::grammar-error { text-decoration: from-font blue wavy underline; } } } button, select { text-transform: none; } [type="button"], [type="reset"], [type="submit"], button { -webkit-appearance: button; @supports (text-box: trim-both cap alphabetic) { text-box: trim-both cap alphabetic; } } ::-moz-focus-inner { padding: 0; border-style: none; } :-moz-focusring { outline: 1px dotted ButtonText; } :-moz-ui-invalid { box-shadow: none; } legend { padding: 0; } progress { vertical-align: baseline; } ::-webkit-inner-spin-button, ::-webkit-outer-spin-button { height: auto; } [type="search"] { -webkit-appearance: textfield; outline-offset: -2px; } ::-webkit-search-decoration { -webkit-appearance: none; } ::-webkit-file-upload-button { -webkit-appearance: button; font: inherit; } summary { display: list-item; } [popover] { inset: auto; } dialog { max-width: 100%; max-height: 100%; } img, picture, video, canvas, svg { width: auto; height: auto; user-select: none; }