Move all the reset styles to a CSS layer in root.css

This commit is contained in:
Eryn Wells 2022-10-14 14:31:10 -07:00
parent d5f9f2a765
commit d50d7ab425
2 changed files with 45 additions and 39 deletions

View file

@ -1,39 +0,0 @@
/* reset.css
* Eryn Wells <eryn@erynwells.me>
*/
* { box-sizing: border-box; }
button, h1, h2, h3, h4, h5, h6, input, ol, ul, p, textarea {
padding: 0;
margin: 0;
}
table {
width: 100%;
border-spacing: 0;
border-collapse: collapse;
}
button,
input,
textarea {
font: inherit;
background: transparent;
border: 0;
outline: 0;
-webkit-appearance: none;
}
button,
input[type='button'],
input[type='submit'] {
cursor: pointer;
}
input:-webkit-autofill,
textarea:-webkit-autofill {
box-shadow: 0 0 0 6rem var(--white) inset;
}
pre { margin: 0; }

View file

@ -1,3 +1,5 @@
@layer reset, root, template, page;
:root {
--black: 0, 0, 0;
--sub-dk-gray: 16, 16, 16;
@ -66,6 +68,49 @@
}
}
@layer reset {
* { box-sizing: border-box; }
button, h1, h2, h3, h4, h5, h6, input, ol, ul, p, textarea {
padding: 0;
margin: 0;
}
h1:first-child, h2:first-child, h3:first-child,
h4:first-child, h5:first-child, h6:first-child {
margin-block-start: 0;
}
table {
width: 100%;
border-spacing: 0;
border-collapse: collapse;
}
button,
input,
textarea {
font: inherit;
background: transparent;
border: 0;
outline: 0;
-webkit-appearance: none;
}
button,
input[type='button'],
input[type='submit'] {
cursor: pointer;
}
input:-webkit-autofill,
textarea:-webkit-autofill {
box-shadow: 0 0 0 6rem var(--white) inset;
}
pre { margin: 0; }
}
a {
color: rgb(var(--mid-blue));
text-decoration: none;