Why does Twitter Bootstrap require multiple classes for buttons?

To make the main key using the Twitter Bootstrap library , you need to use two CSS classes, for example: class="btn btn-primary".

Why did they design the API in such a way that they could make btn-primary include all the CSS that btn includes? Is this solely for maintaining code duplication and therefore for file size or is there a more complex reason?

+3
source share
2 answers

OOCSS. CSS. , .btn, , .btn , .btn , . css .btn-warning , , ;

.btn-warning:hover, .btn-warning:active, .btn-warning.active, .btn-warning.disabled, .btn-warning[disabled] {
    background-color: #F89406;
}

, .

+5

btn-primary . CSS, , , btn-success .

- .

+6

All Articles