optimise triangle mixin