button
.btn
.btn-rev
.btn-diff
.btn-fake
.btn-sm
.btn-chop
.btn-chop-start
.btn-chop-end
Buttons are redefined and normalized to appear and behave as follows. The classnames mentioned below are
not bound to button
tag.
@button-padding-h
and @button-padding-v
@btn-diff-bg
..btn-sm
to make it smaller
@button-sm-padding
The template used to define buttons is a LESS function .btntemplate()
.
Extend or overwrite this template by adding new definitons to the LESS function.
// The button template function in the framework
.btntemplate(){
padding: @button-padding-v @button-padding-h;
display: inline-block;
transition: background-color .518s;
line-height: 1;
.border-radius(@radius);
text-transform: uppercase;
font-size: 90%;
cursor: pointer;
border: 0;
}
// project LESS example
.btntemplate() {
text-transform: none;
}
When placing fake buttons inside a box, the paddings add up and it might look out of alignment. Use .btn-chop
on wrapper to remove extra paddings.
<div class="box">
<div class="btn-chop-start">
<button class="btn-fake">Accept</button>
</div>
</div>
Lorem ipsum dolor sit amet
.btn-chop
.btn-chop
<div class="card box">
<div class="tail btn-chop-end">
<button class="btn-fake">Remove</button>
</div>
</div>
.btn-chop-end
.btn-chop-end