I looked through the LESS sources and it appears the hocus-pocus is the font
property (Notice that in the example 'Tablet body' uses font-size
and 'Large screen body' uses font
). LESS always interpreters font
values with strict-math: on
regardless of the actual compiler options. This also applies to any function used in font
statement. I.e. (with strict-math: off
):
div {
font: 1.5; // -> 1.5
font: 1.5 * 1.5; // -> 1.5 * 1.5
font: round(1.5 * 1.5); // Error, because it is 1.5 * 1.5 "string"
font-size: 1.5; // -> 1.5
font-size: 1.5 * 1.5; // -> 2.25
font-size: round(1.5 * 1.5); // -> 2
}
I guess this was hardcoded there as a workaround for values like font: "Name" 5px/16px ...;
and introduces this bug-like side-effect.