I am trying to create a system that will output different font sizes and line heights for every different media query, in doing so I've been faced with a problem. Any help would be very much appreciated.
The Function
.return-size(@size) when (@size = mob) { @media-dev: "max-width: @media-mobile"; }
.return-size(@size) when (@size = xs) { @media-dev: "max-width: @screen-xs-max"; }
.return-size(@size) when (@size = sm) { @media-dev: "min-width: @screen-sm-min"; }
.return-size(@size) when (@size = md) { @media-dev: "min-width: @screen-md-min"; }
.return-size(@size) when (@size = lg) { @media-dev: "min-width: @screen-lg-min"; }
.font-size-media(@size, @font-size, @multipler: 1.5){
.return-size(@size);
@media (@media-dev){
.font-size(@font-size, @multipler);
}
}
I am using Bootstrap for my responsive design and the variables @screen-..-min relate to pixel values when the screen will resize.
The font-size function simply takes a font size and output the font size and line height based on the multiplier.
The Call (example)
.font-size-media(xs,12);
My main problem is when I pass the string to @media-dev it is outputted in my CSS as a string, is there anyway to strip it of the string tags when it gets passed back into font-size-media.