Discussed in #4304
Originally posted by uncenter December 31, 2024
I have a mixin called rgbify, as seen below:
#rgbify(@color) {
@rgb: red(@color), green(@color), blue(@color);
}
It can be used as color: #rgbify(#fff)[];, and note the [] to capture the return value(s). Without the [] (just #rgbify(#fff)), Less outputs [object Object] as the value for wherever the mixin is used. I most definitely did not mean to have the value be [object Object], and I'm hoping Less could error when it encounters a value like that - otherwise i have no good way of knowing I missed it if I'm not looking carefully/specifically for that mistake.

Discussed in #4304
Originally posted by uncenter December 31, 2024
I have a mixin called
rgbify, as seen below:It can be used as
color: #rgbify(#fff)[];, and note the[]to capture the return value(s). Without the[](just#rgbify(#fff)), Less outputs[object Object]as the value for wherever the mixin is used. I most definitely did not mean to have the value be[object Object], and I'm hoping Less could error when it encounters a value like that - otherwise i have no good way of knowing I missed it if I'm not looking carefully/specifically for that mistake.