Skip to content

Instantly share code, notes, and snippets.

@chaance
Created October 5, 2021 22:38
Show Gist options
  • Save chaance/7fd264fc7afed60a4ca86d6b34c47646 to your computer and use it in GitHub Desktop.
Save chaance/7fd264fc7afed60a4ca86d6b34c47646 to your computer and use it in GitHub Desktop.
Go-to resets for new projects
html {
box-sizing: border-box;
tab-size: 4;
font-family: system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial,
sans-serif, "Apple Color Emoji", "Segoe UI Emoji";
line-height: 1.15;
-webkit-text-size-adjust: 100%;
}
*,
::before,
::after {
box-sizing: inherit;
}
body {
margin: 0;
font-family: inherit;
line-height: inherit;
}
hr {
height: 0;
color: inherit;
}
abbr[title] {
text-decoration: none;
}
b,
strong {
font-weight: bolder;
}
code,
kbd,
samp,
pre {
font-family: ui-monospace, SFMono-Regular, Consolas, "Liberation Mono", Menlo,
monospace;
font-size: 1em;
}
small {
font-size: 80%;
}
sub,
sup {
font-size: 75%;
line-height: 0;
position: relative;
vertical-align: baseline;
}
sub {
bottom: -0.25em;
}
sup {
top: -0.5em;
}
table {
text-indent: 0;
border-color: inherit;
}
button,
input,
optgroup,
select,
textarea {
font-family: inherit;
font-size: 100%;
text-transform: none;
line-height: 1.15;
margin: 0;
}
::-moz-focus-inner {
border-style: none;
padding: 0;
}
:-moz-focusring {
outline: 1px dotted ButtonText;
}
:-moz-ui-invalid {
box-shadow: none;
}
progress {
vertical-align: baseline;
}
::-webkit-inner-spin-button,
::-webkit-outer-spin-button {
height: auto;
}
[type="search"] {
-webkit-appearance: textfield;
outline-offset: -2px;
}
::-webkit-search-decoration {
-webkit-appearance: none;
}
::-webkit-file-upload-button {
-webkit-appearance: button;
font: inherit;
}
summary {
display: list-item;
}
/*
Use on a case-by-case basis to reset all margins/padding
blockquote,
dd,
dl,
fieldset
figure,
h1,
h2,
h3,
h4,
h5,
h6,
hr,
ol,
p,
pre,
ul {
margin: 0;
padding: 0;
}
ol,
ul {
list-style: none;
}
*/
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment