Sunday, May 21, 2017

LESS mixins

This touches on it some. It has the super easy to follow example of:

  1. .hiddenMixin() {
       color: black;
    }

     
  2. p {
       .hiddenMixin()
    }

     
  3. p {
       color: black;
    }

     

1+2=3 above. Get it? The link I provide also shows off setting variables at parameters like so:

.round-borders (@radius) {
   border-radius: @radius;

No comments:

Post a Comment