Super quick question about clamp and sass

I want to be able to evaluate the resulting clamp value and put a negative on it. -#{$height} doesn't work since it evaluates in the browser to -clamp(1rem, 2vw, 2rem).

You'll probably say to just use media queries (😉) but I want it to be fluid.

 &::before {
    $height: clamp(1rem, 2vw, 2rem);
   
    inset: -$height 0 auto 0;
    height: $height;
  }
}
Was this page helpful?