Want to change my variable value on media queries but the value doesn't change at all. Why is that?
I tried to simple change the value on the media query but nothing happens.
// My variables
// All these variables works outside the media queries
$marq-width: 80vw; // using this one
$marq-height: 20vh;
$marq-elm-displayed: 5;
$marq-elements: 9;
$marq-elm-width: calc( #{$marq-width} / #{$marq-elm-displayed} );
$marq-animation-duration: calc(#{$marq-elements} * 3s);
$color: black;
$break-md: 600px;
// Here is my problem
@media(max-width: 600px) {
body {
background: red; // this works
}
$marq-width: 100vw; // this not work
}
Here is my codepen link: https://codepen.io/G-ROS/pen/JjPzovR?editors=0100
You can shrink the viewport on <= 600px and see the background changing to red but the variable did not changes at all. I expect the variable changes has the value "100vw", but it remains with the original value of "80vw".