Last active
November 14, 2019 13:58
-
-
Save Swistikkk/e2d8c6631a64dcf53011 to your computer and use it in GitHub Desktop.
Adaptive mixin (sass)
This file contains 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
@mixin adaptive($media) | |
@if $media == mobile | |
@media only screen and (max-width: $mobile) | |
@content | |
@else if $media == pad | |
@media only screen and (min-width: $mobile + 1) and (max-width: $desktop - 1) | |
@content | |
@else if $media == desktop | |
@media only screen and (min-width: $desktop ) | |
@content |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Использую в sass
.body { @include adaptive(desktop) { // тут пишу стили для разрешения $desktop } }