Bootstrap 4 style guide
1. Read about Bootstrap theming
2. Customize your theme by defining variables in /themes/custom/your-theme/scss/overrides/_variables.scss.
For example:
$font-family-base: roboto-thin,roboto,sans-serif;
$font-weight-normal: 300;
$body-color: rgb(40, 40, 40);
$enable-rounded: false;
$enable-validation-icons: false; // true by default
This reference guide includes commonly used elements:
Navbars
Utilities
Modifiers
{ xs | sm | md | lg | xl } - available sizes for classes, example .d-sm-none - hide on mobile and smaller
{ x | y | t | b | l | r} - available positions x - horizontal, y - vertical, t - top, b - bottom etc, example .mx-0 - remove margin horizonally only
Useful classes
.d-none or .d-{xs|sm|md|lg|xl}-none - hide element
.sr-only - hide element, but make available for screen reader only
.text-left | .text-center | .text-right - text alignment
.m{x|y|t|b|l|r}-{xs|sm|md|lg|xl}-{0-5} - apply margin, eg .m-0 - no margin for all sizes, .my-md-2 - vertical margin for tablet+ of .5 $spacer
.p{x|y|t|b|l|r}-{xs|sm|md|lg|xl}-{0-5} - apply padding, eg .m-0 - no padding for all sizes, .px-md-2 - horizontal padding for tablet+ of .5 $spacer
.row-no-gutters - no margins on row element
more infoButtons
Button group - checkbox
Button group - radio
Button group - vertical
Button group - horizontal
Button toolbar
Typography
Heading 1
Heading 2
Heading 3
Heading 4
Heading 5
Heading 6
Heading with muted text
Vivamus sagittis lacus vel augue laoreet rutrum faucibus dolor auctor.
Example body text
Nullam quis risus eget vel eu leo. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Nullam id dolor id nibh ultricies vehicula.
This line of text is meant to be treated as fine print.
The following is rendered as bold text.
The following is rendered font-weight-bolder.
The following is rendered font-weight-lighter.
The following is a link.
The following is link with text-decoration-none.
The following is rendered as italicized text.
An abbreviation of the word attribute is attr.
Unstyled list
- Lorem ipsum dolor sit amet
- Consectetur adipiscing elit
- Integer molestie lorem at massa
- Facilisis in pretium nisl aliquet
- Nulla volutpat aliquam velit
- Phasellus iaculis neque
- Purus sodales ultricies
- Vestibulum laoreet porttitor sem
- Ac tristique libero volutpat at
- Faucibus porta lacus fringilla vel
- Aenean sit amet erat nunc
- Eget porttitor lorem
Inline list
- Lorem ipsum
- Phasellus iaculis
- Nulla volutpat
Code
For example, <section>
should be wrapped as inline.
Code block
<p>Sample text here...</p>
<p>And another line of sample text here...</p>
Variables
y = mx + b
Keyboard
To switch directories, type cd followed by the name of the directory.
To edit settings, press ctrl + ,
Sample
This text is meant to be treated as sample output from a computer program.
Emphasis classes
Fusce dapibus, tellus ac cursus commodo, tortor mauris nibh.
Nullam id dolor id nibh ultricies vehicula ut id elit.
Pellentesque ornare sem lacinia quam venenatis vestibulum.
Etiam porta sem malesuada magna mollis euismod.
Donec ullamcorper nulla non metus auctor fringilla.
Duis mollis, est non commodo luctus, nisi erat porttitor ligula.
Maecenas sed diam eget risus varius blandit sit amet non magna.
Blockquotes
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Integer posuere erat a ante.
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Integer posuere erat a ante.
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Integer posuere erat a ante.
Images
Responsive images
Thumbnail
Figure
Collapse
Collapse
Accordion
Tables
Type | Column heading | Column heading | Column heading |
---|---|---|---|
Active | Column content | Column content | Column content |
Default | Column content | Column content | Column content |
Primary | Column content | Column content | Column content |
Secondary | Column content | Column content | Column content |
Success | Column content | Column content | Column content |
Danger | Column content | Column content | Column content |
Warning | Column content | Column content | Column content |
Info | Column content | Column content | Column content |
Light | Column content | Column content | Column content |
Dark | Column content | Column content | Column content |
Forms
Navs
Tabs
Raw denim you probably haven't heard of them jean shorts Austin. Nesciunt tofu stumptown aliqua, retro synth master cleanse. Mustache cliche tempor, williamsburg carles vegan helvetica. Reprehenderit butcher retro keffiyeh dreamcatcher synth. Cosby sweater eu banh mi, qui irure terry richardson ex squid. Aliquip placeat salvia cillum iphone. Seitan aliquip quis cardigan american apparel, butcher voluptate nisi qui.
Food truck fixie locavore, accusamus mcsweeney's marfa nulla single-origin coffee squid. Exercitation +1 labore velit, blog sartorial PBR leggings next level wes anderson artisan four loko farm-to-table craft beer twee. Qui photo booth letterpress, commodo enim craft beer mlkshk aliquip jean shorts ullamco ad vinyl cillum PBR. Homo nostrud organic, assumenda labore aesthetic magna delectus mollit.
Etsy mixtape wayfarers, ethical wes anderson tofu before they sold out mcsweeney's organic lomo retro fanny pack lo-fi farm-to-table readymade. Messenger bag gentrify pitchfork tattooed craft beer, iphone skateboard locavore carles etsy salvia banksy hoodie helvetica. DIY synth PBR banksy irony. Leggings gentrify squid 8-bit cred pitchfork.
Trust fund seitan letterpress, keytar raw denim keffiyeh etsy art party before they sold out master cleanse gluten-free squid scenester freegan cosby sweater. Fanny pack portland seitan DIY, art party locavore wolf cliche high life echo park Austin. Cred vinyl keffiyeh DIY salvia PBR, banh mi before they sold out farm-to-table VHS viral locavore cosby sweater.
Pills
Indicators
Alerts
Warning!
Best check yo self, you're not looking too good. Nulla vitae elit libero, a pharetra augue. Praesent commodo cursus magna, vel scelerisque nisl consectetur et.
Badges
Progress
Spinners
Basic
Contextual alternatives
Multiple bars
Striped
Animated
Containers
Hello, world!
This is a simple hero unit, a simple jumbotron-style component for calling extra attention to featured content or information.
It uses utility classes for typography and spacing to space content out within the larger container.
List groups
- Cras justo odio 14
- Dapibus ac facilisis in 2
- Morbi leo risus 1
List group item heading
3 days agoDonec id elit non mi porta gravida at eget metus. Maecenas sed diam eget risus varius blandit.
Donec id elit non mi porta.List group item heading
3 days agoDonec id elit non mi porta gravida at eget metus. Maecenas sed diam eget risus varius blandit.
Donec id elit non mi porta.Cards
Some quick example text to build on the card title and make up the bulk of the card's content.
Some quick example text to build on the card title and make up the bulk of the card's content.
Some quick example text to build on the card title and make up the bulk of the card's content.
Some quick example text to build on the card title and make up the bulk of the card's content.
Some quick example text to build on the card title and make up the bulk of the card's content.
Some quick example text to build on the card title and make up the bulk of the card's content.
Some quick example text to build on the card title and make up the bulk of the card's content.
Some quick example text to build on the card title and make up the bulk of the card's content.
Some quick example text to build on the card title and make up the bulk of the card's content.
Some quick example text to build on the card title and make up the bulk of the card's content.
Some quick example text to build on the card title and make up the bulk of the card's content.
Some quick example text to build on the card title and make up the bulk of the card's content.
Some quick example text to build on the card title and make up the bulk of the card's content.
Some quick example text to build on the card title and make up the bulk of the card's content.
Some quick example text to build on the card title and make up the bulk of the card's content.
Some quick example text to build on the card title and make up the bulk of the card's content.
Some quick example text to build on the card title and make up the bulk of the card's content.
- Cras justo odio
- Dapibus ac facilisis in
- Vestibulum at eros
Some quick example text to build on the card title and make up the bulk of the card's content.
Card link Another link