Here's a question that I need help with. I have a SASS @include function that dynamically calculates the font size.
h2 {
@include rfs(2rem);
}
I use this to adjust the font size based on screen resolution, but I'm facing an issue where a grey background doesn't resize accordingly as the font shrinks.
I was thinking if it's possible to turn @include rfs(2rem) into a variable, then perhaps something like this might work:
$fs: @include rfs(2rem);
.grey-background {
height: calc(#{$fs} + 3vh);
}
I'm not sure if this should be turned into a @mixin or if there's another solution... I just want the grey background to adjust automatically with the changing font size.
Any help would be appreciated. Thanks!