Last active
August 29, 2015 14:01
-
-
Save Jimco/be8b742f4a77f1dea6ad to your computer and use it in GitHub Desktop.
CSS stylesheet template for media queries
This file contains hidden or 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
/* MEDIA QUERIES */ | |
/** | |
* Print styles. | |
* | |
* Inlined to avoid required HTTP connection: www.phpied.com/delay-loading-your-print-css/ | |
*/ | |
@media print { | |
* { background: transparent !important; color: black !important; text-shadow: none !important; filter:none !important; | |
-ms-filter: none !important; } /* Black prints faster: sanbeiji.com/archives/953 */ | |
a, a:visited { color: #444 !important; text-decoration: underline; } | |
a[href]:after { content: " (" attr(href) ")"; } | |
abbr[title]:after { content: " (" attr(title) ")"; } | |
.ir a:after, a[href^="javascript:"]:after, a[href^="#"]:after { content: ""; } /* Don't show links for images, or javascript/internal links */ | |
pre, blockquote { border: 1px solid #999; page-break-inside: avoid; } | |
thead { display: table-header-group; } /* css-discuss.incutio.com/wiki/Printing_Tables */ | |
tr, img { page-break-inside: avoid; } | |
img { max-width: 100% !important; } | |
@page { margin: 0.5cm; } | |
p, h2, h3 { orphans: 3; widows: 3; } | |
h2, h3{ page-break-after: avoid; } | |
} | |
/* Smartphones (portrait) */ | |
@media only screen | |
and (max-width : 320px) { | |
/* Styles */ | |
} | |
/* Smartphones (landscape) */ | |
@media only screen | |
and (min-width : 321px) | |
and (max-width : 480px) { | |
/* Styles */ | |
} | |
/* iPads (portrait) */ | |
@media only screen | |
and (min-width : 481px) | |
and (max-width : 768px) { | |
/* Styles */ | |
} | |
/* iPads (landscape) */ | |
@media only screen | |
and (min-width : 769px) | |
and (max-width : 1024px) { | |
/* Styles */ | |
} | |
/* Larger screens */ | |
@media only screen | |
and (min-width : 1024px) { | |
/* Styles */ | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment