Bootstrap Utility Classes

Built on Bootstrap 5

Canvas is a multipurpose HTML template built on top of Bootstrap 5. Every Bootstrap 5 grid class, utility, and component is available out of the box, and Canvas layers its own utility classes and shortcodes on top. If you know Bootstrap, you already know most of Canvas.

The compiled style.css bundles Bootstrap 5, so you do not need to load Bootstrap separately.

The Grid

Use the standard Bootstrap container, row, and column classes:

<div class="container">
  <div class="row">
    <div class="col-md-6 col-lg-4">Column one</div>
    <div class="col-md-6 col-lg-4">Column two</div>
    <div class="col-md-12 col-lg-4">Column three</div>
  </div>
</div>

Container variants: .container, .container-fluid, and the responsive .container-sm, .container-md, .container-lg, .container-xl, .container-xxl.

Breakpoints

Canvas uses the Bootstrap 5 breakpoint scale. These infixes appear across responsive utilities (grid, spacing, display, heights, and more):

Infix Min width
xs (none) < 576px
sm 576px
md 768px
lg 992px
xl 1200px
xxl 1400px

Utilities and components

All Bootstrap utility families work: display (.d-flex, .d-none, .d-md-block), flex (.justify-content-center, .align-items-center), spacing (.m-*, .p-*), text, colors, borders, and so on. Bootstrap components such as accordions, modals, dropdowns, and navs are themed by Canvas via CSS custom properties (--bs-* and --cnvs-*).

<div class="d-flex justify-content-between align-items-center p-3">
  <span class="fw-semibold">Left</span>
  <button class="button button-rounded">Right</button>
</div>

Canvas adds its own extensions on top of Bootstrap, documented in the other utility pages: contrast colors, hover utilities (.h-*), viewport heights, gradients, transforms, and more.

List of Bootstrap Utility Classes

  1. 1

    Border & Radius

    Check more about Bootstrap's Border Utility Classes here: https://getbootstrap.com/docs/5.1/utilities/borders/ .

  2. 2

    Text & Background Colors

    Check more about Bootstrap's Text & Background Utility Classes here: https://getbootstrap.com/docs/5.1/utilities/colors/ .

  3. 3

    Display

    Check more about Bootstrap's Display Utility Classes here: https://getbootstrap.com/docs/5.1/utilities/display/ .

  4. 4

    Video & Media Embeds

    Check more about Bootstrap's Video & Media Embeds Utility Classes here: https://getbootstrap.com/docs/5.1/utilities/embed/ .

  5. 5

    Flex

    Check more about Bootstrap's Flex Utility Classes here: https://getbootstrap.com/docs/5.1/utilities/flex/ .

  6. 6

    Floats

    Check more about Bootstrap's Float Utility Classes here: https://getbootstrap.com/docs/5.1/utilities/float/ .

  7. 7

    Position

    Check more about Bootstrap's Position Utility Classes here: https://getbootstrap.com/docs/5.1/utilities/position/ .

  8. 8

    Shadows

    Check more about Bootstrap's Shadow Utility Classes here: https://getbootstrap.com/docs/5.1/utilities/shadows/ .

  9. 9

    Widths & Heights

    Check more about Bootstrap's Widths & Heights Utility Classes here: https://getbootstrap.com/docs/5.1/utilities/sizing/ .

  10. 10

    Paddings & Margins

    Check more about Bootstrap's Paddings & Margins Utility Classes here: https://getbootstrap.com/docs/5.1/utilities/spacing/ .

  11. 11

    Text Styling

    Check more about Bootstrap's Text Styling Utility Classes here: https://getbootstrap.com/docs/5.1/utilities/text/ .

Was this page helpful?