1

I am using custom $spacer variable for adjusting UI/page multiple elements size. how to use this under @media query? As below its not working. how to use different $spacer for different resolution? pls help.

@media (min-width: 1280px) {
  $spacer: 16px;
}
@media (min-width: 1600px) {
  $spacer: 24px;
}
Penny Liu
  • 15,447
  • 5
  • 79
  • 98
PRANAV
  • 1,009
  • 5
  • 16
  • 36
  • 2
    You can not use Sass variables inside media queries as media query happens on client side. Please follow this thread for your preferred solution https://stackoverflow.com/questions/9122195/using-sass-variables-with-css3-media-queries – Alvin Konda Jun 05 '20 at 06:59

0 Answers0