HTML & CSS¶
Button¶
<button class="btn {style-class}">Label</button>
Style classes:
btn-defaultbtn-primarybtn-successbtn-dangerbtn-warningbtn-infobtn-textbtn-link
Width classes:
btn-xs-widebtn-s-widebtn-widebtn-xx-widebtn-icon-widebtn-icon-x-widebtn-icon-xx-widebtn-full-wide– 100% width;
Size classes:
btn-smbtn-lg
Other classes:
btn-icon– a button supposed to contain only an icon;
Button group¶
<div class="btn-group">
<button class="btn btn-default"></button>
<button class="btn btn-default"></button>
</div>
Dropdown¶
<div class="btn-group">
<button
class="btn btn-default dropdown-toggle"
data-toggle="dropdown"
>
<span class="fas fa-ellipsis-h"></span>
</button>
<ul class="dropdown-menu pull-right">
<li>
<a
role="button"
tabindex="0"
data-action="someAction"
>Some Action</a>
</li>
<li class="divider"></li>
<li>
<a
href="some-link"
tabindex="0"
>Some Link</a>
</li>
</ul>
</div>
The class pull-right is used to align the menu to the right side.
Panel¶
<div class="panel panel-default">
<div class="panel-heading">
<h4 class="panel-title">Title</h4>
</div>
<div class="panel-body">
</div>
</div>
Style classes:
panel-defaultpanel-successpanel-dangerpanel-warningpanel-infopanel-primary
Panel body classes:
panel-body-form– for panels containing a form;
Table¶
<table class="table"></table>
Classes:
table-fixed– setstable-layout: fixed;table-no-overflow– appliesoverflow: hidden; text-overflow: ellipsisto cells;table-stripedtable-panel– table like a panel;table-bordered-inside– with cell borders;table-hover– accent on row hover;no-margin– no bottom margin;
TH, TG tag classes:
cell-nowrap– suppresses line breaks;
TR tag classes:
accented
List¶
<ul class="list-group">
<li class="list-group-item"></li>
</ul>
Record¶
A field cell on a form:
<div class="cell form-group" data-name="fieldName">
<label class="control-label" data-name="fieldName">
<span class="label-text">Label</span>
</label>
<div class="field" data-name="fieldName">
(field-element)
</div>
</div>
Grid¶
Columns¶
12 columns system:
<div class="row">
<div class="col-sm-6"></div>
<div class="col-sm-3"></div>
<div class="col-sm-3"></div>
</div>
<div class="row">
<div class="col-md-6 col-xs-12"></div>
<div class="col-md-6 col-xs-12"></div>
</div>
<div class="row">
<div class="col-md-6 col-md-offset-6"></div>
</div>
Supported screen widths:
xs– phones, 480px;sm– tablets, 768px;md– medium, 992px;lg– large, 1200px;
Auto-fill grid¶
<div class="grid-auto-fill-md">
<div></div>
<div></div>
<div></div>
</div>
Sizes:
xxsxssmmd
Type¶
Text¶
Style:
text-softtext-mutedtext-primarytext-successtext-dangertext-warningtext-infotext-boldtext-italic(as of v8.0)text-strikethrough(as of v8.2)
Size:
text-largetext-2emtext-3emtext-4emtext-5emtext-6em
Label¶
<span class="label label-md label-default">Text</span>
Style classes:
label-defaultlabel-primarylabel-successlabel-dangerlabel-warninglabel-info
Size classes:
label-md
Misc¶
Centering:
center-align– appliestext-align: center;
A horizontally centered block:
block-centerblock-center-smblock-center-md
A container that horizontally & vertically centers its child:
container-centering
Border radius:
radius-left– forces an element to have border radius on the left;radius-right– forces an element to have border radius on the right;
Floating:
pull-left– appliesfloat: left;pull-right– appliesfloat: right;
Cancelling margins:
no-margin– cancels margins for an element contained in a panel and other containers;no-side-margin– cancels side margins for an element contained in a panel and other containers;
Margins:
margin– applies a margin to all sides;margin-top-smmargin-topmargin-top-2xmargin-bottom-smmargin-bottommargin-bottom-2xmargin-bottom-3xmargin-bottom-4x