Skip to content

Instantly share code, notes, and snippets.

@hoanghuynh
Created May 12, 2015 08:00
Show Gist options
  • Save hoanghuynh/89eac641232ba1ac93ae to your computer and use it in GitHub Desktop.
Save hoanghuynh/89eac641232ba1ac93ae to your computer and use it in GitHub Desktop.
media query
$tablet-width: 768px;
$phone-width: 320px;
$desktop-width: 1024px;
$widescreen-width: 1400px;
@mixin tablet {
@media (min-width: #{$tablet-width}) and (max-width: #{$desktop-width - 1px}) {
@content;
}
}
@mixin mobile {
@media (min-width: #{$phone-width}) and (max-width: #{$desktop-width - 1px}) {
@content;
}
}
@mixin phone {
@media (min-width: #{$phone-width}) and (max-width: #{$tablet-width - 1px}) {
@content;
}
}
@mixin desktop {
@media (min-width: #{$desktop-width}) {
@content;
}
}
@mixin ultra {
@media (min-width: #{$widescreen-width - 1px}) {
@content;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment