About the @ media media query of sass and the scope of! global

/* $remUnit!global */
/* :$remUnit*/
/* 10210241920$remUnit192 */
/* : @media */
/* :$remUnit1024102192 */
$remUnit: null !default;
@media screen and (min-width: 1024px) {
  $remUnit: 102 !global;
}
@media screen and (min-width: 1920px) {
  $remUnit: 192 !global;
}
// :10241920$remUnit192
Apr.11,2021

< H2 > example 1 < / H2 >

Sass pre-compilation

$remUnit: null !default;
@media screen and (min-width: 1024px) {
  $remUnit: 102 !global;
}
@media screen and (min-width: 1920px) {
  $remUnit: 192 !global;
}

body {
  width: $remUnit;
}

after compilation

body {
  width: 192;
}
< H2 > example 2 < / H2 >

Sass pre-compilation

$remUnit: null !default;
body {
  @media screen and (min-width: 1024px) {
    $remUnit: 102 !global;
    width: $remUnit;
  }
  @media screen and (min-width: 1920px) {
    $remUnit: 192 !global;
    width: $remUnit;
  }
}

after compilation

@media screen and (min-width: 1024px) {
  body {
    width: 102;
  }
}
@media screen and (min-width: 1920px) {
  body {
    width: 192;
  }
}
Menu