title: Less - guardian mixins good practices
body: <p>I created small Less @mixin for lightness value conditional. I was using Sass for my applications UI's and I'm realy confused how to create good conditionals in Less. Can anybody answer me that, is it good pice of code for Less conditionals?</p>
  
  <p>Less source:</p>
  
  <pre><code>.lightness (@conditionalValue, @lightnessPercentage, @propertyName, @truePropertyValue, @falsePropertyValue) when (lightness(@conditionalValue) &gt;= @lightnessPercentage) {
      @{propertyName}: @truePropertyValue;
  }
  .lightness (@conditionalValue, @lightnessPercentage, @propertyName, @truePropertyValue, @falsePropertyValue) when (lightness(@conditionalValue) &lt; @lightnessPercentage) {
      @{propertyName}: @falsePropertyValue;
  }
  
  
  .class1 { .lightness(white,65%,background,black,white) }
  .class2 { .lightness(black,65%,background,black,white) }
  </code></pre>
  
  <p>Css output:</p>
  
  <pre><code>.class1 {
    background: black;
  }
  .class2 {
    background: white;
  }
  </code></pre>