Skip to content

Instantly share code, notes, and snippets.

@AnachronisticTech
Created November 11, 2019 21:47
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 AnachronisticTech/1e8aaad93dc6a2d10fe17ac0ac8ccb9d to your computer and use it in GitHub Desktop.
Save AnachronisticTech/1e8aaad93dc6a2d10fe17ac0ac8ccb9d to your computer and use it in GitHub Desktop.
A responsive CSS template with media queries for devices of different widths
/* GLOBAL STYLES */
/* Set default transition time to 0s */
* {
transition:0s;
}
/* Hide element click outline */
:focus {
outline:none;
}
/* RESET STYLES */
/* Set page height to 100% of viewport height */
html {
height:100%;
}
/* Remove body padding and margins */
body {
padding:0px;
margin:0px;
}
/* RESPONSIVE STYLES */
/* Screens narrower than 360px */
@media only screen and (max-width:359px) {}
/* Screens between 360px and 575px */
@media only screen and (max-width:575px) and (min-width:360px) {}
/* Screens between 576px and 899px */
@media only screen and (max-width:899px) and (min-width:576px) {}
/* Screens between 900px and 1249px */
@media only screen and (max-width:1249px) and (min-width:900px) {}
/* Screens between 1250px and 1649px */
@media only screen and (max-width:1649px) and (min-width:1250px) {}
/* Screens wider than 1650px */
@media only screen and (min-width:1650px) {}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment