Answer the question
In order to leave comments, you need to log in
Responsive layout scss mixin not working in webpack?
Greetings. I build the project using this builder config: https://tocode.ru/curses/nastroika-webpack4 . For the convenience of adaptive layout, I wrote scss mixin:
$breakpoints: (
"phone": 400px,
"phone-wide": 480px,
"phablet": 560px,
"tablet-small": 640px,
"tablet": 768px,
"tablet-wide": 1024px,
"desktop": 1248px,
"desktop-wide": 1440px
);
@mixin mq($width, $type: max) {
@if map_has_key($breakpoints, $width) {
$width: map_get($breakpoints, $width);
@if $type == max {
$width: $width - 1px;
}
@media (#{$type}-width: $width) {
@content;
}
}
}
header.desktop{
display: block;
@include mq('phone') {
display: none;
}
}
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question