Created
June 5, 2024 17:54
-
-
Save kmafeni04/08cb42430fe70b14977ac628192353e3 to your computer and use it in GitHub Desktop.
css reset
This file contains 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
:root { | |
--font-color-light: black; | |
--font-color-dark: white; | |
} | |
@media (prefers-color-scheme: light) { | |
:root { | |
--font-color: var(--font-color-light); | |
} | |
} | |
@media (prefers-color-scheme: dark) { | |
:root { | |
--font-color: var(--font-color-dark); | |
} | |
} | |
* { | |
font-family: | |
system-ui, | |
-apple-system, | |
BlinkMacSystemFont, | |
"Segoe UI", | |
Roboto, | |
Oxygen, | |
Ubuntu, | |
Cantarell, | |
"Open Sans", | |
"Helvetica Neue", | |
sans-serif; | |
padding: 0; | |
margin: 0; | |
color: inherit; | |
box-sizing: inherit; | |
} | |
*, | |
*::after, | |
*::before { | |
box-sizing: inherit; | |
} | |
html { | |
color-scheme: dark light; | |
box-sizing: border-box; | |
} | |
@media (prefers-reduced-motion: no-preference) { | |
html { | |
scroll-padding-top: 4rem; | |
scroll-behavior: smooth; | |
} | |
} | |
body { | |
color: var(--font-color); | |
min-height: 100svh; | |
} | |
img, | |
video, | |
svg, | |
picture { | |
display: block; | |
width: 100%; | |
} | |
input, | |
textarea, | |
button, | |
select { | |
font: inherit; | |
} | |
button { | |
cursor: pointer; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment