Skip to content

Display

Utilities for controlling the display box type of an element.

ClassProperties
flexdisplay: flex;
griddisplay: grid;
blockdisplay: block;
hiddendisplay: none;
tabledisplay: table;
table-captiondisplay: table-caption;
table-celldisplay: table-cell;
table-columndisplay: table-column;
table-column-groupdisplay: table-column-group;
table-footer-groupdisplay: table-footer-group;
table-header-groupdisplay: table-header-group;
table-row-groupdisplay: table-row-group;
table-rowdisplay: table-row;
flow-rootdisplay: flow-root;
contentsdisplay: contents;
list-itemdisplay: list-item;
inline-flexdisplay: inline-flex;
inline-griddisplay: inline-grid;
inline-blockdisplay: inline-block;
inline-tabledisplay: inline-table;

Flex

Use flex to create a block-level flex container.

html
<div class="flex">
  <!-- ... -->
</div>
<div class="flex">
  <!-- ... -->
</div>

Grid

Use grid to create a grid container.

html
<div class="grid">
  <!-- ... -->
</div>
<div class="grid">
  <!-- ... -->
</div>

Block

Use block to create a block-level element.

html
<div class="block">
  <!-- ... -->
</div>
<div class="block">
  <!-- ... -->
</div>

Hidden

Use hidden to set an element to display: none and remove it from the page layout

html
<div class="hidden">
  <!-- ... -->
</div>
<div class="hidden">
  <!-- ... -->
</div>

Table

Use the table, .table-row, .table-cell, .table-caption, .table-column, .table-column-group, .table-header-group, table-row-group, and .table-footer-group utilities to create elements that behave like their respective table elements.

html
<div class="table">
  <div class="table-row-group">
    <div class="table-row">
      <div class="table-cell">
        <!-- ... -->
      </div>
    </div>
  </div>
</div>
<div class="table">
  <div class="table-row-group">
    <div class="table-row">
      <div class="table-cell">
        <!-- ... -->
      </div>
    </div>
  </div>
</div>

Flow-Root

Use flow-root to create a block-level element with its own block formatting context.

html
<div class="flow-root">
  <!-- ... -->
</div>
<div class="flow-root">
  <!-- ... -->
</div>

Contents

Use contents to create a "phantom" container whose children act like direct children of the parent.

html
<div class="contents">
  <!-- ... -->
</div>
<div class="contents">
  <!-- ... -->
</div>

Inline

Use inline, inline-flex, inline-grid, inline-block, inline-table to create an inline element.

html
<div class="inline-block">
  <!-- ... -->
</div>
<div class="inline-block">
  <!-- ... -->
</div>

Responsive

To control the display property of an element at a specific breakpoint, add a {screen}: prefix to any existing display utility class. For example, use md:inline-flex to apply the inline-flex utility at only medium screen sizes and above.

html
<div class="flex md:inline-flex">
  <!-- ... -->
</div>
<div class="flex md:inline-flex">
  <!-- ... -->
</div>

For more information about Gridi responsive design features, check out the Responsive Design documentation.

Released under the MIT License.