Skip to content

Instantly share code, notes, and snippets.

@riix
Last active December 10, 2015 03:48
Show Gist options
  • Select an option

  • Save riix/4376810 to your computer and use it in GitHub Desktop.

Select an option

Save riix/4376810 to your computer and use it in GitHub Desktop.
MediaQueries
@charset "utf-8";
/* =============================================================================
* Filename: media.css
* Author: riix, EPASS C&I
* Update: 2013-01-01
============================================================================= */
/* =============================================================================
Category : Handheld
============================================================================= */
@media handheld {
.screen { display: none; visibility: hidden; }
}
/* =============================================================================
Category : Print
============================================================================= */
@media print {
p, h2, h3 { orphans: 3; widows: 3; }
img { max-width: 100% !important; }
}
/* =============================================================================
Category : Smartphones (portrait and landscape)
============================================================================= */
@media only screen
and (min-device-width : 320px)
and (max-device-width : 480px) {
/* Styles */
}
/* =============================================================================
Category : Smartphones (landscape)
============================================================================= */
@media only screen
and (min-width : 321px) {
/* Styles */
}
/* =============================================================================
Category : Smartphones (portrait)
============================================================================= */
@media only screen
and (max-width : 320px) {
/* Styles */
}
/* =============================================================================
Category : iPads (portrait and landscape)
============================================================================= */
@media only screen
and (min-device-width : 768px)
and (max-device-width : 1024px) {
/* Styles */
}
/* =============================================================================
Category : iPads (landscape)
============================================================================= */
@media only screen
and (min-device-width : 768px)
and (max-device-width : 1024px)
and (orientation : landscape) {
/* Styles */
}
/* =============================================================================
Category : iPads (portrait)
============================================================================= */
@media only screen
and (min-device-width : 768px)
and (max-device-width : 1024px)
and (orientation : portrait) {
/* Styles */
}
/* =============================================================================
Category : Desktops and laptops
============================================================================= */
@media only screen
and (min-width : 1224px) {
/* Styles */
}
/* =============================================================================
Category : Large screens
============================================================================= */
@media only screen
and (min-width : 1824px) {
/* Styles */
}
/* =============================================================================
Category : iPhone 4
============================================================================= */
@media
only screen and (-webkit-min-device-pixel-ratio : 1.5),
only screen and (min-device-pixel-ratio : 1.5) {
/* Styles */
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment