From b2804a942eca4ad7090782c1163bf7693ea41256 Mon Sep 17 00:00:00 2001 From: Nathan Upchurch Date: Tue, 2 Jan 2024 12:53:52 -0500 Subject: [PATCH] Update reset.css --- reset.css | 41 +++++++++++++++++++++++++---------------- 1 file changed, 25 insertions(+), 16 deletions(-) diff --git a/reset.css b/reset.css index 2bf6c0e..c49a883 100644 --- a/reset.css +++ b/reset.css @@ -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