Extending Bootstrap
Boomstrap contains an incredible collection of additions to Bootstrap. Among this collection are reusable user interface components designed specifically to work within the Boomtown CRM platform.
Boomstrap is a ui pattern library built on the Bootstrap framework - with BoomTown branding and custom, reusable components.
Boomstrap contains an incredible collection of additions to Bootstrap. Among this collection are reusable user interface components designed specifically to work within the Boomtown CRM platform.
We developed Boomstrap to work with jQuery / Bootstrap.js or with Angular.
Install Boomstrap via NPM.
npm install boomstrap --save
Install Boomstrap via Bower.
bower install https://github.com/BoomTownROI/boomstrap.git --save
Please follow these rules when writing markup, LESS, and when hooking in to JavaScript.
:
in property declarations.{
in rule declarations.Here is an example of good syntax:
.dog-brutus {
&:extend(.dog);
background: @gray;
color: @danger;
padding: 12px;
.text-overflow();
}
Use px
for font-size
, because it offers absolute control over text. Additionally, unit-less line-height
is preferred because it does not inherit a percentage value of its parent element, but instead is based on a multiplier of the font-size
.
Never reference js-
prefixed class names from CSS files. js-
are used exclusively from JS files.
Use the is-
prefix for state rules that are shared between CSS and JS.
Elements that occur exactly once inside a page should use IDs, otherwise, use classes. When in doubt, use a class name.
When styling a component, start with an element + class namespace (prefer class names over ids), prefer direct descendant selectors by default, and use as little specificity as possible. Here is a good example:
BoomTown uses the 'Airbnb Javascript Style Guide'. You can find our forked copy here.