Gianpiero Caretti Gianpiero Caretti - 3 years ago 297
Less Question

How to override properties of a CSS class altering the original value (less + mixin)

Let's say I use bootstrap and what to override the

class of a percentage using less and mixin

Is it possible to do something like this?

// this is my style.less file loaded *after* bootstrap.css
.jumbotron {
padding-top: _original_padding-top_ * 0.5

Answer Source


So you simply do something like:

@import "bootstrap/variables.less";

.jumbotron {
    padding-top: @jumbotron-padding * .5;


Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download