Update reset.css

This commit is contained in:
Nathan Upchurch 2024-01-08 18:29:56 -05:00
parent 4debd50535
commit 535bcaa805

View File

@ -1,36 +1,36 @@
// Where hanging-punctuation is not supported: /* Where hanging-punctuation is not supported: */
@supports not (hanging-punctuation: first) { @supports not (hanging-punctuation: first) {
// Set a baseSize to use in calculating negative indent /* Set a baseSize to use in calculating negative indent
:root { :root {
--baseSize: 2rem; --baseSize: 2rem;
} }
// Apply negative indent /* Apply negative indent */
html { html {
text-indent: calc((var(--baseSize) / 2) * -1); text-indent: calc((var(--baseSize) / 2) * -1);
} }
} }
// Where hanging-punctuation is supported: /* Where hanging-punctuation is supported: */
@supports (hanging-punctuation: first) { @supports (hanging-punctuation: first) {
// Remove text-indent and apply hanging-punctuation /* Remove text-indent and apply hanging-punctuation */
html { html {
text-indent: 0; text-indent: 0;
hanging-punctuation: first last; // Although "last" isn't handled by an indentation if unsupported, we'll just try our luck here 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. /* Use a more-intuitive box-sizing model. */
*, *::before, *::after { *, *::before, *::after {
box-sizing: border-box; box-sizing: border-box;
} }
* { * {
line-height: calc(1em + 0.5rem); // Calculate optimal line-height (This may break things; see https://www.joshwcomeau.com/css/custom-css-reset/#three-tweaking-line-height-4) line-height: calc(1em + 0.5rem); /* Calculate optimal line-height (This may break things; see https://www.joshwcomeau.com/css/custom-css-reset/#three-tweaking-line-height-4) */
margin: 0; // Remove default margin margin: 0; /* Remove default margin */
} }
// Apply curly quotes to blockquote /* Apply curly quotes to blockquote */
blockquote { blockquote {
&::before { &::before {
content: open-quote; content: open-quote;
@ -42,21 +42,21 @@ blockquote {
body { body {
-webkit-font-smoothing: antialiased; // Improve text rendering for modern high-dpi screens -webkit-font-smoothing: antialiased; /* Improve text rendering for modern high-dpi screens */
} }
// Improve media defaults /* Improve media defaults */
img, picture, video, canvas, svg { img, picture, video, canvas, svg {
display: block; display: block;
max-width: 100%; max-width: 100%;
} }
// Remove built-in form typography styles /* Remove built-in form typography styles */
input, button, textarea, select { input, button, textarea, select {
font: inherit; font: inherit;
} }
// Avoid text overflows /* Avoid text overflows */
p, h1, h2, h3, h4, h5, h6 { p, h1, h2, h3, h4, h5, h6 {
overflow-wrap: break-word; overflow-wrap: break-word;
hyphens: auto; hyphens: auto;