You can create a mixin that is "protected" by a type, for example.
.doHeightSet(@height) when ispercentage(@height) { .doheightSet(1024px) } .doHeightSet(@height) when not ispercentage(@height) { // Calculations dependent on @height @textAreaHeight: 0.5 * @height; @buttonHeight: 0.2 * @height; /* use variables here */ }
Sorry, I donβt have time to try this, so I may have made a syntax error.
change the correct syntax.
source share