Update reset.css

This commit is contained in:
Nathan Upchurch 2024-01-02 12:53:52 -05:00
parent 14c75df58d
commit b2804a942e

View File

@ -1,8 +1,22 @@
// Set a baseSize to use in calculating negative indent where hanging-punctuation is not supported
// Where hanging-punctuation is not supported:
@supports not (hanging-punctuation: first) {
// Set a baseSize to use in calculating negative indent
:root {
--baseSize: 2rem;
}
// Apply negative indent
html {
text-indent: calc((var(--baseSize) / 2) * -1);
}
}
// Where hanging-punctuation is supported:
@supports (hanging-punctuation: first) {
// Remove text-indent and apply hanging-punctuation
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
}
}
// Use a more-intuitive box-sizing model.
@ -15,26 +29,21 @@
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
// Apply curly quotes to blockquote
blockquote {
&::before {
content: open-quote;
}
&::after {
content: close-quote;
}
}
body {
line-height: 1.5;
-webkit-font-smoothing: antialiased;
line-height: 1.5; // Add accessible line-height
-webkit-font-smoothing: antialiased; // Improve text rendering for modern high-dpi screens
}
// Improve media defaults