No media query for xs
Created by: robertzajda
Hi
There are a great mixins for media query media-breakpoint-*
, but it's not possible to build media query for xs.
I tried to use media-breakpoint-between(xs, xs)
. In my opinion it should return:
@media (min-width: 0) and (max-width: 576px) {
but it returns:
@media (min-width: null) and (max-width: 576px) {
The problem is in breakpoint-min
function:
@function breakpoint-min($name, $breakpoints: $grid-breakpoints) {
$min: map-get($breakpoints, $name);
@return if($min != 0, $min, null);
}
This small fix with return solves the problem:
@function breakpoint-min($name, $breakpoints: $grid-breakpoints) {
$min: map-get($breakpoints, $name);
@return $min;
}
So null will be returned only when breakpoint does not exists.