Last active
September 21, 2020 15:19
-
-
Save Andy-set-studio/3ff68ebe3011e17f5ea7c287f47868fc to your computer and use it in GitHub Desktop.
Minimal CSS reset
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
/* Box sizing rules */ | |
* { | |
box-sizing: border-box; | |
} | |
*:before, | |
*:after { | |
box-sizing: inherit; | |
} | |
/* Remove margin and padding from elements */ | |
body, | |
h1, | |
h2, | |
h3, | |
h4, | |
p, | |
ul, | |
ol, | |
li, | |
dd, | |
figure, | |
figcaption, | |
dl, | |
dd, | |
dt { | |
margin: 0px; | |
padding: 0px; | |
} | |
body { | |
/* Hide persistent scrollbar in IE (10/11) and Edge */ | |
-ms-overflow-style: -ms-autohiding-scrollbar; | |
/* Anchor links will transition rather than skip */ | |
scroll-behavior: smooth; | |
/* Reset font size to 1rem, in case it has a pixel value */ | |
font-size: 1rem; | |
min-height: 100vh; | |
} | |
/* Remove list styles on ul, ol elements with a class attribute */ | |
ul[class], | |
ol[class] { | |
list-style: none; | |
} | |
/* A elements that don't have a class get default styles */ | |
a:not([class]) { | |
text-decoration: underline; | |
text-decoration-skip-ink: auto; | |
cursor: pointer; | |
} | |
/* Turn off the recent search in WebKit. */ | |
::-webkit-search-decoration { | |
display: none; | |
} | |
/* Normalise form field line-height in WebKit */ | |
input::-webkit-input-placeholder, | |
textarea::-webkit-input-placeholder, | |
select::-webkit-input-placeholder { | |
line-height: normal; | |
} | |
/* Make a search box appear like a text box */ | |
input[type='search'] { | |
-webkit-appearance: textfield; | |
} | |
/* Make images responsive */ | |
img { | |
max-width: 100%; | |
} | |
/* Remove _all_ animations and transitions for people that prefer not to see them */ | |
@media (prefers-reduced-motion: reduce) { | |
* { | |
-webkit-animation: none !important; | |
animation: none !important; | |
transition: none !important; | |
scroll-behavior: auto !important; | |
} | |
} |
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
*{box-sizing:border-box}:after,:before{box-sizing:inherit}body,dd,dl,dt,figcaption,figure,h1,h2,h3,h4,li,ol,p,ul{margin:0;padding:0}body{-ms-overflow-style:-ms-autohiding-scrollbar;scroll-behavior:smooth;font-size:1rem;min-height:100vh}ol[class],ul[class]{list-style:none}a:not([class]){text-decoration:underline;text-decoration-skip-ink:auto;cursor:pointer}::-webkit-search-decoration{display:none}input::-webkit-input-placeholder,select::-webkit-input-placeholder,textarea::-webkit-input-placeholder{line-height:normal}input[type=search]{-webkit-appearance:textfield}img{max-width:100%}@media (prefers-reduced-motion:reduce){*{-webkit-animation:none!important;animation:none!important;transition:none!important;scroll-behavior:auto!important}} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment