feh1ks
11/29/2016 - 1:36 PM

Button hover lighten/darken bg

Button hover lighten/darken bg

// MIXIN
.hover-lighten (@bg,@color) {
  background: @bg;
  color: @color;
  transition: all .25s;
  
  &:hover {
    background: lighten(@bg, 5%);
    color: @color;
  }
}

.hover-darken (@bg,@color) {
  background: @bg;
  color: @color;
  transition: all .25s;
  
  &:hover {
    background: darken(@bg, 5%);
    color: @color;
  }
}

// USAGE
.btn1 {
  .hover-lighten(#00897B,#fff);
}

.btn2 {
  .hover-darken(#00897B,#fff);
}