Skip to content

Instantly share code, notes, and snippets.

@tjinauyeung
Created August 24, 2016 18:33
Show Gist options
  • Save tjinauyeung/5e91aa3d957060be734d9e1ae8cff7e3 to your computer and use it in GitHub Desktop.
Save tjinauyeung/5e91aa3d957060be734d9e1ae8cff7e3 to your computer and use it in GitHub Desktop.
// Dimensions
$desktop-width-min: 1024px;
$desktop-width-max: 1920px;
$phone-width-min: 320px;
$phone-width-max: 480px;
$tablet-width-min: 768px;
$tablet-width-max: 1024px;
$mobile-view: '(max-width: #{$tablet-width-min - 1})';
$tablet-view: '(min-width: #{$tablet-width-min}) and (max-width: #{$tablet-width-max})';
$desktop-view: '(min-width: #{$tablet-width-max + 1})';
@mixin mobile {
@media #{$mobile-view} {
@content;
}
}
@mixin tablet {
@media #{$tablet-view} {
@content;
}
}
@mixin desktop {
@media #{$desktop-view} {
@content;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment