HTML & CSS¶
Button¶
html
<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¶
```html
```
Dropdown¶
```html
```
The class pull-right is used to align the menu to the right side.
Panel¶
```html
Title
```
Style classes:
panel-defaultpanel-successpanel-dangerpanel-warningpanel-infopanel-primary
Panel body classes:
panel-body-form– for panels containing a form;
Table¶
```html
```
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¶
```html
```
Record¶
A field cell on a form:
```html
(field-element)
```
Grid¶
Columns¶
12 columns system:
```html
```
```html
```
```html
```
Supported screen widths:
xs– phones, 480px;sm– tablets, 768px;md– medium, 992px;lg– large, 1200px;
Auto-fill grid¶
```html
```
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¶
html
<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