Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save mhimon/7afb8cb705ec989b8e0960d0098cbccc to your computer and use it in GitHub Desktop.
Save mhimon/7afb8cb705ec989b8e0960d0098cbccc to your computer and use it in GitHub Desktop.
Media Query For Responsive Design ( Sass )
$small_mobile:'(max-width: 767px)';
$large_mobile: 'only screen and (min-width: 480px) and (max-width: 767px)';
$tab_device:'only screen and (min-width: 768px) and (max-width: 991px)';
$desktop: '(min-width: 1281px)';
|--| How to use ?
just add this code into your scss file
body
{
@media #{$small_mobile}{
color: red;
}
@media #{$large_mobile}{
color: blue;
}
@media #{$tab_device}{
color: green;
}
@media #{$desktop}{
color: black;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment