Skip to content

Instantly share code, notes, and snippets.

@andrejsharapov
Created October 20, 2019 19:48
Show Gist options
  • Save andrejsharapov/488c2c9c4bbf4f0716c86517b422a881 to your computer and use it in GitHub Desktop.
Save andrejsharapov/488c2c9c4bbf4f0716c86517b422a881 to your computer and use it in GitHub Desktop.
CSS Reset
*,
*::before,
*::after {
box-sizing: border-box;
}
html {
font-family: sans-serif;
-webkit-text-size-adjust: 100%;
-moz-text-size-adjust: 100%;
-webkit-tap-highlight-color: transparent;
scroll-behavior: smooth;
}
body {
overflow-x: hidden;
min-height: 100vh;
text-rendering: optimizeSpeed;
line-height: 1.5;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
}
body,
p,
ul[class],
ol[class],
li,
figure,
figcaption,
blockquote {
margin: 0;
}
h1,
h2,
h3,
h4,
h5,
h6 {
margin-top: 0.2rem;
margin-bottom: .5rem;
}
a {
text-decoration: none;
background-color: transparent;
cursor: pointer;
&:not([class]) {
text-decoration-skip-ink: auto;
}
&:focus {
outline: none;
}
}
ul[class],
ol[class] {
list-style: none;
padding: 0;
}
img {
display: block;
max-width: 100%;
}
svg {
overflow: hidden;
}
img,
svg,
canvas,
iframe,
audio,
video {
vertical-align: middle;
}
input,
button,
textarea,
select {
font: inherit;
}
input[type="text"],
input[type="email"],
input[type="tel"],
input[type="date"],
input[type="search"],
input[type="submit"],
input[type="button"],
button:not([class]),
textarea,
select {
margin: 0;
padding: 0;
font: inherit;
line-height: inherit;
border: 0;
background-color: transparent;
&:focus {
outline: none;
}
}
input[type="submit"],
input[type="button"],
button {
cursor: pointer;
}
@media (prefers-reduced-motion: reduce) {
* {
animation-duration: 0.01ms !important;
animation-iteration-count: 1 !important;
transition-duration: 0.01ms !important;
scroll-behavior: auto !important;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment