I'd like to (temporarily) remove the units of my variables @baseLineHeight
and @baseFontSize
, so that I can divide them to get a relative line-height
. This is what I've tried:
@baseFontSize: 12px;
@baseLineHeight: 18px;
font: @baseFontSize~"/"@baseLineHeight/@baseFontSize sans-serif;
Generates the following error:
Object #<Object> has no method 'toCSS' (Less::ParseError)
Preferred output:
font: 12px/1.5 sans-serif;
Meanwhile there seems to be a function for that: http://lesscss.org/functions/#misc-functions-unit
Here the code from the comment, just for completeness. (thanks to cfx).
font: @baseFontSize~"/"unit(@baseLineHeight/@baseFontSize) sans-serif;
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With