Skip to content

Instantly share code, notes, and snippets.

@xiwcx
Last active July 8, 2018 20:44
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save xiwcx/ed24cdbb7de0dda75a9c10373df47c96 to your computer and use it in GitHub Desktop.
Save xiwcx/ed24cdbb7de0dda75a9c10373df47c96 to your computer and use it in GitHub Desktop.
the welch canavan "reset"

The Welch Canavan "Reset"

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;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment