Cześć,
Napotkałem mały problem. Napisałem mixina w sass i chcę do niego dopisać możliwość wybrania orientacji (landscape lub portrait). Mógłby ktoś mnie chociaż naprowadzić na rozwiązanie?
Aktualnie mixin wyglada tak:
$breakpoints: (
"phone": 400px,
"phablet": 560px,
"tablet": 768px,
"tablet-wide": 1024px,
"desktop": 1248px,
"desktop-wide": 1440px,
"4K-560": 2560px
);
$orientation: (
"landscape": landscape,
"portrait": portrait
);
@mixin mq($width, $type: min) {
@if map_has_key($breakpoints, $width) {
$width: map_get($breakpoints, $width);
@if $type == max {
$width: $width - 1px;
}
@media only screen and (#{$type}-width: $width) {
@content;
}
}
}