Display
The display utility provides a quick way to control display behavior of elements such as block, inline, flex, grid, or none.
It supports both static and responsive variants generated through mixins and loops.
Naming convention
Section titled “Naming convention”All classes follow the structure:
.u--display-{value}.u--display-{breakpoint}-{value}When to use
Section titled “When to use”Use this utility when:
- You need to toggle element visibility (
block,none,inline, etc.) - You want to switch layouts responsively (e.g.,
flexon desktop,blockon mobile) - You want to apply layout behaviors like
flexorgrid
Responsive variants
Section titled “Responsive variants”This utility supports responsive variants, using breakpoint prefixes like:
desktop, laptop, tabletl, tabletm, tablets, mobile.
How to use
Section titled “How to use”In HTML
<div class="u--display-flex u--display-tabletm-block u--display-tablets-none"> <p>Hello world</p></div>In CSS
.c--card-a { @extend .u--display-flex; @extend .u--display-tabletm-block; @extend .u--display-tablets-none;}Knowledge Check
Test your understanding of this section
Loading questions...