Use shorthand display utility classes to quickly change an elements display value.
Display utility classes can be defined using the format -d-{breakpoint}--{value}
.
Breakpoints supported are sm
, md
, lg
, and xl
.
Display utility classes with no breakpoint defined apply to all screen sizes.
Display Class | Value |
---|---|
-d--none | display: none; |
-d--inline | display: inline; |
-d--inline-block | display: inline-block; |
-d--block | display: block; |
-d--table | display: table; |
-d--table-cell | display: table-cell; |
-d--table-row | display: table-row; |
-d--flex | display: flex; |
-d--inline-flex | display: inline-flex; |
To target a specific breakpoint, add the breakpoint abbreviation to the class.
Display Class | Value |
---|---|
-d-sm--none | Hidden only on sm |
-d-md--none | Hidden only on md |
-d-lg--none | Hidden only on lg |
-d-xl--none | Hidden only on xl |
<!-- hidden on all breakpoints except xl -->
<div class="-d--none -d-xl--inline-flex"></div>
<!-- hidden on sm breakpoints -->
<div class="-d-sm--none"></div>
<!-- inline-flex on all breakpoints -->
<div class="-d--inline-flex"></div>
<!-- flex on all breakpoints -->
<div class="-d--flex"></div>