Created
May 8, 2018 09:43
-
-
Save mhimon/7afb8cb705ec989b8e0960d0098cbccc to your computer and use it in GitHub Desktop.
Media Query For Responsive Design ( Sass )
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$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