2 комментария so far.
Leave a Comment
@mixin media($query) {
@if $query {
@media only screen and (#{$query}) { @content; }
}
}
Использование:
html, body {
width: 100%;
@include media("max-width: 400px") {
width: 400px;
overflow-x: auto !important;
}
}
Использование со встраиванием переменных:
html, body {
$smallScreenWidth: 400px;
width: 100%;
@include media("max-width: #{$smallScreenWidth}") {
width: $smallScreenWidth;
overflow-x: auto !important;
}
}
Для отправки комментария вам необходимо авторизоваться.
.profile-pic {
float: left;
width: 250px;
@include media(lg)
width: 100%
@include media(md)
width: 125px;
}
https://gist.github.com/shuvalov-anton/1c75c23c9c70c1641057