Hi i was trying to apply multiple mixins to a particular class based on width , but that does not working. When we apply mixins individually it works fine is there any way to apply multiple mixins.
@include largeDevice, mediumeDevice {
width: 600px;
}
the above css is to apply multiple mixins to a class , Whether this is right way.
Applying multiple Mixins (Not Working)
.battery-component svg {
width: 540px;
@include largeDevice, mediumeDevice {
width: 600px;
}
@include extraSmallDevice {
width: 500px;
}
}
Applying mixins individually but this is (Working fine)
.battery-component svg {
width: 540px;
@include largeDevice {
width: 600px;
}
@include mediumeDevice {
width: 600px;
}
@include extraSmallDevice {
width: 500px;
}
}
Is there any way to apply multiple mixins
custom_mixin.scss
@mixin bottom-panel($maxWidth) {
width: $maxWidth;
}
$breakpoint-lr: 1200px;
$breakpoint-md: 992px;
$breakpoint-sm: 768px;
$breakpoint-xs: 600px;
@mixin largeDevice {
@media (min-width: #{$breakpoint-lr}) {
@content;
}
}
@mixin mediumDevice {
@media (min-width: #{$breakpoint-md}) and (max-width: #{$breakpoint-lr - 1px}) {
@content;
}
}
@mixin smallDevice {
@media (min-width: #{$breakpoint-sm}) and (max-width: #{$breakpoint-md - 1px}) {
@content;
}
}
@mixin extraSmallDevice {
@media (min-width: #{$breakpoint-xs}) and (max-width: #{$breakpoint-sm - 1px}) {
@content;
}
}