pokahotass
pokahotass

Reputation: 97

Percentage of a value in less css

@x : 1000px;

width: @x - 20%;

So value should be 800, but instead it's 980 :|

Anyone know why

Upvotes: 1

Views: 83

Answers (1)

Curtis
Curtis

Reputation: 103348

You could use the following

width: @x - (@x/5);

Or for any particular percentage:

width: @x - ((@x/100)*(100-20));

Upvotes: 1

Related Questions