mostly so i can stop googling these things every damn time
I don't use frameworks or resets almost ever, but there are a few indispensable things I find myself reaching for (and therefore googling) constantly. #lazyweb
/* | |
* box sizing reset | |
* | |
* https://css-tricks.com/inheriting-box-sizing-probably-slightly-better-best-practice/ | |
*/ | |
html { | |
box-sizing: border-box; | |
} | |
*, | |
*:before, | |
*:after { | |
box-sizing: inherit; | |
} | |
/* | |
* visually hidden utility class | |
* | |
* https://a11yproject.com/posts/how-to-hide-content/ | |
* https://github.com/h5bp/html5-boilerplate/blob/2e32b433f77ea693d69f1728e6796e102fd84df0/dist/css/main.css#L137 | |
*/ | |
.visually-hidden { | |
border: 0; | |
clip: rect(0 0 0 0); | |
height: 1px; | |
margin: -1px; | |
overflow: hidden; | |
padding: 0; | |
position: absolute; | |
width: 1px; | |
white-space: nowrap; | |
} |