Skip to content

Instantly share code, notes, and snippets.

@adamfaux85
Created October 23, 2018 12:49
Show Gist options
  • Save adamfaux85/9e59eeacba4a21dd5b007263c1b1878e to your computer and use it in GitHub Desktop.
Save adamfaux85/9e59eeacba4a21dd5b007263c1b1878e to your computer and use it in GitHub Desktop.
Browser Media Queries
// Webkit (Chrome & Safari, any version)
@media screen and (-webkit-min-device-pixel-ratio:0) {
// style.
}
// Firefox (any version)
@-moz-document url-prefix() {
// style.
}
// Safari (7.1+)
_::-webkit-full-page-media, _:future, :root .safari_only {
// style.
}
// Safari (from 6.1 to 10.0)
@media screen and (min-color-index:0) and(-webkit-min-device-pixel-ratio:0) {
@media {
// style.
}
}
// Safari (10.1+)
@media not all and (min-resolution:.001dpcm) {
@media {
// style.
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment