Update reset.css
This commit is contained in:
parent
14c75df58d
commit
b2804a942e
41
reset.css
41
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) {
|
@supports not (hanging-punctuation: first) {
|
||||||
|
// Set a baseSize to use in calculating negative indent
|
||||||
:root {
|
:root {
|
||||||
--baseSize: 2rem;
|
--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.
|
// Use a more-intuitive box-sizing model.
|
||||||
@ -15,26 +29,21 @@
|
|||||||
margin: 0;
|
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) {
|
// Apply curly quotes to blockquote
|
||||||
html {
|
blockquote {
|
||||||
text-indent: 0;
|
&::before {
|
||||||
hanging-punctuation: first last; // Although "last" isn't handled by an indentation if unsupported, we'll just try our luck here
|
content: open-quote;
|
||||||
|
}
|
||||||
|
&::after {
|
||||||
|
content: close-quote;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
body {
|
body {
|
||||||
line-height: 1.5;
|
line-height: 1.5; // Add accessible line-height
|
||||||
-webkit-font-smoothing: antialiased;
|
-webkit-font-smoothing: antialiased; // Improve text rendering for modern high-dpi screens
|
||||||
}
|
}
|
||||||
|
|
||||||
// Improve media defaults
|
// Improve media defaults
|
||||||
|
Loading…
x
Reference in New Issue
Block a user