min and max function dose not work properly
To reproduce:
// less code here
Current behavior:
Expected behavior:
Environment information:
lessversion:nodejsversion:operating system:
Hi @PuvvadaBhaskar! I'm Dosu and I’m helping the less.js team.
The min and max functions in Less are designed to work with numbers and units, and their implementation checks for unit compatibility and correct argument types. If you pass incompatible units or non-numeric values, Less will throw an error or silently ignore the issue depending on the context. Also, functions like min and max cannot be used inside variable interpolation syntax (@{}); only variable names are valid there. If you try to use a function call inside interpolation, Less will output the string as-is without evaluating it, and won't throw an error. To interpolate a function result, assign it to a variable first and then interpolate that variable instead (source).
If you're seeing unexpected behavior, please share a minimal example of your Less code, the output you're getting, and your environment details (Less version, Node.js version, OS). This will help pinpoint whether it's a usage issue, a bug, or something environment-specific.
To reply, just mention @dosu.
How did I do? Good | Irrelevant | Incorrect | Verbose | Hallucination | Report 🐛 | Other