The .optional-prop
mixin in the less version tests whether a value is a color, number or string. However, those tests do not cover all possible values.
It seems the code expects values like border-box
for box-sizing or 1em 0
for margins to be strings, which is not the case: see less documentation.The values will be completely ignored and the option not rendered.
For box-sizing, adding iskeyword
can do the trick. Sadly, it does not seem to be possible to use shorthand properties with multiple values (e.g. for margins) as this fails all existing type functions (a single value could be a string or a number).