Skip to content

Instantly share code, notes, and snippets.

@paularmstrong
Created July 11, 2012 16:38
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save paularmstrong/3091603 to your computer and use it in GitHub Desktop.
Save paularmstrong/3091603 to your computer and use it in GitHub Desktop.
Media Query variables in LESS
@mq-phone: ~'(max-width: 767px)';
@mq-tablet: ~'(min-width: 768px) and (max-width: 979px)';
@mq-desktop: ~'(min-width: 980px)';
@mq-dpi-2: ~'(-webkit-min-device-pixel-ratio: 2)';
@media @mq-phone {
// styles for phone
}
@media @mq-tablet {
// styles for tablet
}
@media @mq-dpi-2 {
// styles hi-res
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment