UNPKG

reset-zone

Version:

A modern CSS reset for modern web applications!

467 lines (466 loc) 9.45 kB
@layer reset-zone { *, *::before, *::after { margin: 0; padding: 0; -webkit-box-sizing: border-box; -moz-box-sizing: border-box; box-sizing: border-box; } @media (prefers-reduced-motion: no-preference) { html, html:focus-within { scroll-behavior: smooth; } } @media (prefers-reduced-motion: reduce) { html, html:focus-within { scroll-behavior: auto; } } body { min-height: 100dvh; line-height: 1.5; -webkit-font-smoothing: antialiased; } :where(body) { overflow-wrap: break-word; -webkit-hyphens: auto; -moz-hyphens: auto; -ms-hyphens: auto; hyphens: auto; } p, h1, h2, h3, h4, h5, h6 { overflow-wrap: break-word; } ul[role=list], menu[role=list], ol[role=list] { list-style: none; } main, header, footer, section, article, aside, nav, menu, details, summary, object, embed, figcaption, figure, hgroup, img, picture, video, canvas, svg, meter, progress { display: block; } sup, sub { position: relative; font-size: 75%; line-height: 0; vertical-align: baseline; } sup { top: -0.5em; } sub { bottom: -0.25em; } menu { unicode-bidi: -webkit-isolate; unicode-bidi: -moz-isolate; unicode-bidi: isolate; } a:not([class]) { -webkit-text-decoration-skip: ink; text-decoration-skip-ink: auto; -webkit-text-decoration-line: underline; -moz-text-decoration-line: underline; text-decoration-line: underline; text-decoration-thickness: max(0.08em, 1px); text-underline-offset: 0.15em; } img, picture, video, canvas, svg { height: auto; font-style: italic; background-repeat: no-repeat; -o-background-size: cover; background-size: cover; -webkit-shape-margin: 1rem; shape-margin: 1rem; } img, picture, video, canvas, svg, object, embed { max-width: 100%; } object, embed { border: none; } meter, progress { width: 100%; max-width: -webkit-calc(100% - 1rem); max-width: -moz-calc(100% - 1rem); max-width: calc(100% - 1rem); height: 1.25rem; margin-block: 0.5rem; padding-inline: 0.5rem; } meter::-webkit-progress-bar, progress::-webkit-progress-bar { background-color: transparent; } meter::-webkit-progress-value, progress::-webkit-progress-value { background-color: currentColor; } meter::-moz-progress-bar, progress::-moz-progress-bar { background-color: currentColor; } figcaption { font-style: italic; } fieldset { min-width: 0; border: none; } legend { width: auto; max-width: none; border: none; display: block; float: none; font: inherit; text-align: start; color: inherit; background: none; } input, button, textarea, select, option, mark, small, dfn, abbr, cite, time, data { font: inherit; } blockquote, q { quotes: none; } blockquote::before, blockquote::after, q::before, q::after { content: none; } details:not([open]) > *:not(summary) { display: none; } bdi, bdo { unicode-bidi: -webkit-isolate; unicode-bidi: -moz-isolate; unicode-bidi: isolate; } hr { height: 1px; border: none; background: currentColor; opacity: 0.1; } pre, code, kbd, samp { --rz-code-font: courier, monospace; font-family: var(--rz-code-font, inherit); font-size: inherit; white-space: pre-wrap; -moz-tab-size: 2; -o-tab-size: 2; tab-size: 2; } table { border-collapse: collapse; border-spacing: 0; } br + br { display: none; } @supports selector(:is) { body > :is(header, footer), main, section, article { container-type: inline-size; } } @supports not selector(:is) { body > header, body > footer, main, section, article { container-type: inline-size; } } @supports selector(:where) { :where([hidden]) { display: none; } } @supports not selector(:where) { [hidden] { display: none; } } audio :not([controls]) { display: none; } [aria-busy=true] { cursor: progress; } [aria-controls] { cursor: pointer; } [aria-disabled] { cursor: default; } @supports selector(:focus-visible) { :focus-visible { outline: max(1px, 0.15em) solid currentColor; outline-offset: max(1px, 0.15em); } } @supports not selector(:focus-visible) { :focus { outline: max(1px, 0.15em) solid currentColor; outline-offset: max(1px, 0.15em); } } :target { scroll-padding-block-start: 2rem; } :focus { scroll-padding-block-end: 8vh; } ::-webkit-input-placeholder { color: inherit; opacity: 0.5; } :-moz-placeholder { color: inherit; opacity: 0.5; } ::-moz-placeholder { color: inherit; opacity: 0.5; } :-ms-input-placeholder { color: inherit; opacity: 0.5; } ::-ms-input-placeholder { color: inherit; opacity: 0.5; } ::placeholder { color: inherit; opacity: 0.5; } @media (prefers-reduced-motion: reduce) { *, *::before, *::after { -webkit-animation-duration: 0.01ms; -moz-animation-duration: 0.01ms; -o-animation-duration: 0.01ms; animation-duration: 0.01ms; -webkit-animation-delay: -1ms; -moz-animation-delay: -1ms; -o-animation-delay: -1ms; animation-delay: -1ms; -webkit-animation-iteration-count: 1; -moz-animation-iteration-count: 1; -o-animation-iteration-count: 1; animation-iteration-count: 1; -webkit-transition-duration: 0s; -moz-transition-duration: 0s; -o-transition-duration: 0s; transition-duration: 0s; -webkit-transition-delay: 0s; -moz-transition-delay: 0s; -o-transition-delay: 0s; transition-delay: 0s; scroll-behavior: auto; background-attachment: initial; -webkit-perspective: none; -moz-perspective: none; perspective: none; -webkit-transform-style: flat; -moz-transform-style: flat; transform-style: flat; } } dialog { max-width: 90%; max-height: 85dvh; margin: auto; padding: 0; border: 1px solid hsl(0, 0%, 91.81%); -webkit-border-radius: 0.5rem; border-radius: 0.5rem; -ms-scroll-chaining: none; overscroll-behavior: contain; scroll-behavior: smooth; scrollbar-width: none; scrollbar-color: transparent transparent; -webkit-animation: rz-bottom-to-top 0.25s ease-in-out forwards; -moz-animation: rz-bottom-to-top 0.25s ease-in-out forwards; -o-animation: rz-bottom-to-top 0.25s ease-in-out forwards; animation: rz-bottom-to-top 0.25s ease-in-out forwards; } @media only screen and (width > 767px) { dialog { max-width: 45rem; } } dialog::-webkit-scrollbar { width: 0; display: none; } dialog::-webkit-scrollbar-track { background-color: transparent; } dialog::-webkit-scrollbar-thumb { background-color: transparent; } dialog::-webkit-backdrop { background-color: hsl(0, 0%, 0%); opacity: 0.5; } dialog::-ms-backdrop { background-color: hsl(0, 0%, 0%); opacity: 0.5; } dialog::backdrop { background-color: hsl(0, 0%, 0%); opacity: 0.5; } @-webkit-keyframes rz-bottom-to-top { 0% { opacity: 0; -webkit-transform: translateY(10%); transform: translateY(10%); } 100% { opacity: 1; -webkit-transform: translateY(0); transform: translateY(0); } } @-moz-keyframes rz-bottom-to-top { 0% { opacity: 0; -moz-transform: translateY(10%); transform: translateY(10%); } 100% { opacity: 1; -moz-transform: translateY(0); transform: translateY(0); } } @-o-keyframes rz-bottom-to-top { 0% { opacity: 0; -o-transform: translateY(10%); transform: translateY(10%); } 100% { opacity: 1; -o-transform: translateY(0); transform: translateY(0); } } @keyframes rz-bottom-to-top { 0% { opacity: 0; -webkit-transform: translateY(10%); -moz-transform: translateY(10%); -o-transform: translateY(10%); transform: translateY(10%); } 100% { opacity: 1; -webkit-transform: translateY(0); -moz-transform: translateY(0); -o-transform: translateY(0); transform: translateY(0); } } @media print { @page { margin: 1.875rem; } a[href^=http]::after { content: " (" attr(href) ")"; } } /* This is for accessibility purposes */ .sr-only { width: 1px; height: 1px; border: 0; margin: -1px; padding: 0; position: absolute; clip: rect(0, 0, 0, 0); overflow: hidden; white-space: nowrap; } /* This is for accessibility purposes */ .not-sr-only { width: auto; height: auto; position: static; padding: 0; margin: 0; overflow: visible; clip: auto; white-space: normal; } }