I am trying to put a resolution range per size of the device
$screen: "only screen" !default
$medium-range: (40.063em, 64em)
Now, I wanted to get the element of it, so I created a function for it
@function upper-bound($list)
@return list.nth($list, 2)
@function lower-bound($list)
@return list.nth($list, 1)
I am trying to interpolate the function that I have created
$medium-only: "#{$screen} and (min-width:#{lower-bound($medium-range)}) and (max-width:#{upper-bound($medium-range)})" !default
But when I look at the generated CSS, it becomes like this.
@media only screen and (min-width:$lower-bound($medium-range)) and (max-width:upper-bound(40.063em, 64em)) {}
What could be the problem?