CSS-Reset/reset.css

59 lines
1.2 KiB
CSS
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

// Set a baseSize to use in calculating negative indent where hanging-punctuation is not supported
@supports not (hanging-punctuation: first) {
:root {
--baseSize: 2rem;
}
}
// Use a more-intuitive box-sizing model.
*, *::before, *::after {
box-sizing: border-box;
}
// Remove default margin
* {
margin: 0;
}
/*
Typographic tweaks:
* Add accessible line-height
* Improve text rendering
* Apply hanging punctuation with fallback if unsupported
*/
html {
text-indent: calc((var(--baseSize) / 2) * -1); // Negative indent for use where hanging-punctuation is unsupported
}
@supports (hanging-punctuation: first) {
html {
text-indent: 0;
hanging-punctuation: first last; // Although "last" isn't handled by an indentation if unsupported, we'll just try our luck here
}
}
body {
line-height: 1.5;
-webkit-font-smoothing: antialiased;
}
// Improve media defaults
img, picture, video, canvas, svg {
display: block;
max-width: 100%;
}
// Remove built-in form typography styles
input, button, textarea, select {
font: inherit;
}
// Avoid text overflows
p, h1, h2, h3, h4, h5, h6 {
overflow-wrap: break-word;
}
// Create a root stacking context
#root, #__next {
isolation: isolate;
}