Book Image

Learning Bootstrap

Book Image

Learning Bootstrap

Overview of this book

Table of Contents (15 chapters)
Learning Bootstrap
Credits
About the Authors
About the Reviewers
www.PacktPub.com
Preface
Free Chapter
1
Getting Started with Bootstrap
Index

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) {
  &::-moz-placeholder           { color: @color; } // Firefox
  &:-ms-input-placeholder       { color: @color; } // Internet Explorer 10+
  &...