Skip to content

Instantly share code, notes, and snippets.

@Semigradsky
Created January 30, 2016 18:17
Show Gist options
  • Save Semigradsky/47aa5083289f75bb2682 to your computer and use it in GitHub Desktop.
Save Semigradsky/47aa5083289f75bb2682 to your computer and use it in GitHub Desktop.
/*
* Repeating the background mostly makes sense in the <body>. Otherwise, people
* usually want the image and preferably its center (not the top-right corner)
*/
*:not(body) {
background-repeat: no-repeat;
background-position: 50%;
background-size: cover;
}
/*
* tables borders like they should be
* applied to * to also works for display: table;
*/
html {border-collapse: collapse}
* {border-collapse: inherit}
/*
* box model like it should be
*
* http://www.paulirish.com/2012/box-sizing-border-box-ftw/
*/
html {box-sizing: border-box}
*,
*:before,
*:after {
box-sizing: inherit;
}
/*
* kill document defaults margin & padding. We all do that all the times, right ?
*/
html,
body {
margin: 0;
padding: 0;
}
/*
* Makes the hidden attribute works even when an element is styled display: flex
* http://lists.w3.org/Archives/Public/public-whatwg-archive/2014May/0001.html
*/
[hidden] {display: none !important}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment