Bootstrap cheatsheet - odoo-ps/psbe-process GitHub Wiki
Classes and CSS CHEATSHEET
Bootstrap
Changes in Bootstrap versions 4
Here are some of the main changes beetwen Bootstrap versions that can affect templates and reports. To read more about it you can check here.
Grid system
- XS grid classes have been modified to not require the infix. Instead of
*.col-xs-6, it’s now.col-6. All other grid tiers require the infix (sm, md, lg, xl). - OFFSET classes have changed the syntax. Instead of
.col-[infix]-offset-*, it’s nowoffset-[infix]-*. For example: .col-md-offset-2 is now offset-md-2. As explained in the previous point, xs do not require the infix in offset classes either, for example: .col-xs-offset-2 is now offset-2
Tables
- Renamed
.table-condensedto.table-sm.
Forms
- Renamed
.control-labelto.col-form-labe.
Buttons
- Renamed
.btn-defaultto.btn-secondary.
Labels and badges
- Renamed
.labelto.badge. Classes like label label-success are now badge badge-success.
Useful Bootstrap classes
Text transform
text-lowercase: Set text to lowercasetext-uppercase: Set text to uppercasetext-capitalize: Capitalize the first letter of each word
Text alignment
text-left: Left aligned text on all viewport sizestext-center: Center aligned text on all viewport sizestext-right: Right aligned text on all viewport sizes
To change the style according to the viewport size, text-[infix]-[position] can be used, for example: text-md-left, text-lg-right.