Display
Apply display properties of an element
Classes
Class | Properties |
---|---|
.inline | display: inline; |
.block | display: block; |
.inline-block | display: inline-block; |
.grid | display: grid; |
.inline-grid | display: inline-grid; |
.flex | display: flex; |
.inline-flex | display: inline-flex; |
.table | display: table; |
.table-row | display: table-row; |
.table-cell | display: table-cell; |
.table-caption | display: table-caption; |
.table-column | display: table-column; |
.table-column-group | display: table-column-group; |
.table-footer-group | display: table-footer-group; |
.table-header-group | display: table-header-group; |
.table-row-group | display: table-row-group; |
.display-none | display: none; |
.inline
Sets the display property to inline
.
xxxxxxxxxx
1
<div class="bg-gray-1">
2
<div class="inline p-4 bg-gray-2">1</div>
3
<div class="inline p-4 bg-gray-3">2</div>
4
<div class="inline p-4 bg-gray-2">3</div>
5
<div class="inline p-4 bg-gray-3">4</div>
6
</div>
1
2
3
4
.block
Sets the display property to block
.
xxxxxxxxxx
1
<div class="p-4 text-center bg-gray-1">
2
<span class="block p-4 bg-gray-2">1</span>
3
<span class="block p-4 bg-gray-3">2</span>
4
<span class="block p-4 bg-gray-2">3</span>
5
<span class="block p-4 bg-gray-3">4</span>
6
</div>
1
2
3
4
.inline-block
Sets the display property to inline-block
.
xxxxxxxxxx
1
<div class="p-4 bg-gray-1">
2
<div class="inline-block p-4 bg-gray-2">1</div>
3
<div class="inline-block p-4 bg-gray-3">2</div>
4
<div class="inline-block p-4 bg-gray-2">3</div>
5
<div class="inline-block p-4 bg-gray-3">4</div>
6
</div>
1
2
3
4
.flex
Sets the display property to flex
.
xxxxxxxxxx
1
<div class="flex p-4 text-center bg-gray-1">
2
<span class="flex-grow m-2 p-4 bg-gray-2">1</span>
3
<span class="flex-grow m-2 p-4 bg-gray-3">2</span>
4
<span class="flex-grow m-2 p-4 bg-gray-2">3</span>
5
<span class="flex-grow m-2 p-4 bg-gray-3">4</span>
6
</div>
1
2
3
4
.inline-flex
Sets the display property to inline-flex
.
xxxxxxxxxx
1
<div class="inline-flex p-4 bg-gray-1">
2
<div class="p-4 bg-gray-2">1</div>
3
<div class="p-4 bg-gray-3">2</div>
4
<div class="p-4 bg-gray-2">3</div>
5
<div class="p-4 bg-gray-3">4</div>
6
</div>
1
2
3
4
.grid
Sets the display property to grid
.
xxxxxxxxxx
1
<div class="grid columns-3 p-4 text-center bg-gray-1">
2
<span class="p-4 bg-gray-2">1</span>
3
<span class="p-4 bg-gray-3">2</span>
4
<span class="p-4 bg-gray-2">3</span>
5
<span class="p-4 bg-gray-3">4</span>
6
<span class="p-4 bg-gray-2">5</span>
7
<span class="p-4 bg-gray-3">6</span>
8
</div>
1
2
3
4
5
6
.inline-grid
Sets the display property to inline-grid
.
xxxxxxxxxx
1
<div class="inline-grid columns-3 p-4 bg-gray-1">
2
<div class="p-4 bg-gray-2">1</div>
3
<div class="p-4 bg-gray-3">2</div>
4
<div class="p-4 bg-gray-2">3</div>
5
<div class="p-4 bg-gray-3">4</div>
6
<span class="p-4 bg-gray-2">5</span>
7
<span class="p-4 bg-gray-3">6</span>
8
</div>
1
2
3
4
5
6
.display-none
Sets the display property to none
.
xxxxxxxxxx
1
<div class="p-4 text-center bg-gray-1">
2
<div class="p-4 bg-gray-2">1</div>
3
<div class="display-none p-4 bg-gray-3">2</div>
4
<div class="display-none p-4 bg-gray-2">3</div>
5
<div class="p-4 bg-gray-3">4</div>
6
</div>
1
2
3
4
Responsive
<div class="flex bp1:block bp2:inline-block bp3:grid bp4:flex ...">
<!-- ... -->
</div>
1
2
3