I'm currently utilizing a certain mixin to create font sizes in rem with fallback pixel values, while also determining a line-height that is 1.5 times the font size.
.font(@size: 16px, @line: @size) {
@remfont: (@size / 10);
@remline: (@size / 10) * 1.5;
font-size: @size * 1px;
font-size: ~"@{remfont}rem";
line-height: @size * 1.5px;
line-height: ~"@{remline}rem";
}
The downside is that I have to input a value for the line-height, even though it's not necessary once compiled. My LESS code using this mixin looks like this:
.font(13, 10);
Which produces the following output:
font-size: 13px;
font-size: 1.3rem;
line-height: 19.5px;
line-height: 1.9500000000000002rem;
Is there a way to adjust this mixin so that it automatically sets the line-height to be 1.5 times the font-size without requiring manual input?