59 lines
1.2 KiB
CSS
59 lines
1.2 KiB
CSS
// 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;
|
||
} |