Last active
June 6, 2016 14:35
-
-
Save oshihirii/ce1c8c38d5bb7b99f3b2adbe64c69e1e to your computer and use it in GitHub Desktop.
solutions to commonly encountered css scenarios
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* vertical align button in absolute div */ | |
/* https://css-tricks.com/centering-css-complete-guide */ | |
/* whitespace between inline-blocks */ | |
/* remove padding and margin from page */ | |
html,body { | |
height: 100%; | |
margin: 0; | |
padding: 0; | |
overflow-x: hidden; | |
} | |
/* set border-box for all elements */ | |
*,:before,:after { | |
-webkit-box-sizing: border-box; | |
-moz-box-sizing: border-box; | |
box-sizing: border-box; | |
} | |
/* media queries */ | |
/* (http://cssmediaqueries.com/what-are-css-media-queries.html) */ | |
/* (https://developer.mozilla.org/en-US/docs/Web/CSS/Media_Queries) */ | |
/* (http://getskeleton.com/#queries) */ | |
/* mobile first queries */ | |
/* larger than mobile */ | |
@media (min-width: 400px) { | |
} | |
/* larger than phablet */ | |
@media (min-width: 550px) { | |
} | |
/* larger than tablet */ | |
@media (min-width: 750px) { | |
} | |
/* larger than desktop */ | |
@media (min-width: 1000px) { | |
} | |
/* larger than desktop hd */ | |
@media (min-width: 1200px) { | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment