So im just testing some media queries for scss in my webpack project. I've just got a simple div within the body, and want the background to change depending on the width of the screen.
My two smallest media queries, small & xsmall, just don't apply, and I can't figure out why.
No matter how narrow I make the screen, the background stays green below 900px
$xsmall: 300px;
$small: 600px;
$medium: 900px;
$large: 1200px;
$xlarge: 1500px;
$xxlarge: 2000px;
body {
margin: 0;
padding: 0;
width: 100%;
height: 100vh;
.test-class {
width: 100%;
height: 100%;
@media (min-width: $xsmall) { <--- Doesn't Apply
background-color: purple;
}
@media (min-width: $small) { <--- Doesn't Apply
background-color: pink;
}
@media (min-width: $medium) {
background-color: green;
}
@media (min-width: $large) {
background-color: yellow;
}
@media (min-width: $xlarge) {
background-color: blue;
}
@media (min-width: $xxlarge) {
background-color: orange;
}
}
}