Gap
gap, column-gap or row-gap properties. It controls the spacing between items in a grid or flex container. value can be either one of our predefined spacing tokens (0 - 1250).| CSS Shortcut class | Applied style |
|---|---|
| |
| |
| |
Examples
Gap
gap-<value>
--gcds-spacing-400 of space between them. 1
2
3
4
<div class="d-grid grid-cols-2 gap-400">
<p>1</p>
<p>2</p>
<p>3</p>
<p>4</p>
</div> Horizontal gap
gap-x-<value>
--gcds-spacing-400 of space between them. 1
2
3
4
<div class="d-grid grid-cols-2 gap-x-400">
<p>1</p>
<p>2</p>
<p>3</p>
<p>4</p>
</div> Vertical gap
gap-y-<value>
--gcds-spacing-400 of space between them. 1
2
3
4
<div class="d-grid grid-cols-2 gap-y-400">
<p>1</p>
<p>2</p>
<p>3</p>
<p>4</p>
</div> xs:> 480pxsm:> 640pxmd:> 768pxlg:> 1024pxxl:> 1280px
<div class="xs:gap-300 ...">
...
</div>