Less confused about `max() + calc()`
$ lessc --version
lessc 4.1.1 (Less Compiler) [JavaScript]
$ lessc <(echo 'body { padding: max(1em, calc(50vw - 25rem)); } ')
body {
padding: 1em;
}
Expected output:
body {
padding: max(1em, calc(50vw - 25rem));
}
Any subset of the expression (e.g. max(1em, 50vw) or calc(50vw - 25rem)) works fine.
Having the same issue with nested var function in min();
eg.
min(var(--maxWidth, 50rem), 100%)
compiles to
100% instead of expected min(var(--maxWidth, 50rem), 100%)
Seems to execute less-provided min function instead of the one from vanilla CSS.
calc inside max is redundant
max(1em, calc(50vw - 25rem)) can be max(1em, 50vw - 25rem)
However, max(1em, 50vw - 25rem) compiles to max(1em, 25vw) instaed of max(1em, 50vw - 25rem)
A workaround is ~"max(1em, 50vw - 25rem)"
Hi @matthew-dean @iChenLei. Is there any chance the fix for this bug can be merged and published? Thanks.