Created
January 15, 2024 17:10
-
-
Save badg0003/0c6238a4974326f7cd27d72414beddde to your computer and use it in GitHub Desktop.
CSS Reset (Kevin Powell https://www.youtube.com/watch?v=cCAtD_BAHNw)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* makes sizing simpler */ | |
*, | |
*::before, | |
*::after { | |
box-sizing: border-box; | |
} | |
/* remove default spacing */ | |
/* force styling of type through styling, rather than elements */ | |
* { | |
margin: 0; | |
padding: 0; | |
font: inherit; | |
} | |
/* dark mode user-agent-styles */ | |
/* improves punctuation in supported browsers */ | |
html { | |
color-scheme: dark light; | |
hanging-punctuation: first last; | |
} | |
/* min body height */ | |
body { | |
min-height: 100svh; | |
} | |
/* responsive images/videos */ | |
img, | |
picture, | |
svg, | |
video { | |
display: block; | |
max-width: 100%; | |
} | |
/* Improved heading in supported browsers */ | |
h1, | |
h2, | |
h3, | |
h4, | |
h5, | |
h6 { | |
text-wrap: balance; | |
} | |
/* improve readability with max-width on paragraphs and lists */ | |
/* prevent orphans in supported browsers */ | |
p, | |
li { | |
max-width: var(--p-max-width, 65ch); | |
text-wrap: pretty; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment