O'Reilly logo

Learning Bootstrap by Ulrich Sossou, Aravind Shenoy

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Customizing the Base CSS using LESS variables

Bootstrap has LESS variables that can be used for components and the default values are listed as follows:

@padding-base-vertical:     6px;
@padding-base-horizontal:  12px;

@padding-large-vertical:   10px;
@padding-large-horizontal: 16px;

@padding-small-vertical:    5px;
@padding-small-horizontal: 10px;

@padding-xs-vertical:       1px;
@padding-xs-horizontal:     5px;

@line-height-large:        1.33;
@line-height-small:         1.5;

@border-radius-base:        4px;
@border-radius-large:       6px;
@border-radius-small:       3px;

@component-active-color:   #fff;
@component-active-bg:   @brand-primary;

@caret-width-base:          4px;
@caret-width-large:         5px;

You can change the placeholder contextual color using the following code:

.placeholder(@color: @input-color-placeholder) ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required