Skip to content

Instantly share code, notes, and snippets.

@alixaxel
Created June 25, 2012 03:15
Show Gist options
  • Save alixaxel/2986273 to your computer and use it in GitHub Desktop.
Save alixaxel/2986273 to your computer and use it in GitHub Desktop.
/* Imagine we want to serve a the same portrait rendering for iPad and Kindle, we could do: */
@media only screen and (device-height : 1024px) and (orientation : portrait) and (min-device-width : 600px) and (max-device-width : 768px) {
/* CSS for iPad and Kindle here (portrait) */
}
/* The following would make it easier to split the rules if needed later on (although I've grouped the common conditions here): */
@media only screen and (device-height : 1024px) and (orientation : portrait) and (
(device-width : 600px) or
(device-width : 768px)
) {
/* CSS for iPad and Kindle here (portrait) */
}
/* iPad only: */
@media only screen and (device-height : 1024px) and (orientation : portrait) and (device-width : 768px) {
/* CSS for iPad here (portrait) */
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment