JimP
JimP

Reputation: 1076

Need to lighten a color within the variables passed in a LESS mixin

I am currently updating the bootstrap source less files for a project and I have to modify the hover state for the buttons. The end goal is something along these lines:

.btn-primary {
  .buttonBackground(@btnPrimaryBackgroundHighlight, @btnPrimaryBackground);

  &.hover {
    .buttonBackground( lighten(@btnPrimaryBackgroundHighlight, %20), lighten(@btnPrimaryBackground, %20));
  }
} 

However, that returns a compile error. Any thoughts on this issue? I'm sure it's something simple, but I'm at a loss. Thanks in advance.

P.S. - I will also be using the :hover pseudo-class, but for sake of example I'm using a simple class.

Upvotes: 0

Views: 134

Answers (1)

freejosh
freejosh

Reputation: 11383

Put the percent sign after the number (20% instead of %20)

Upvotes: 2

Related Questions