Padding
padding property. It controls the space inside an element between its content and border. value can be either one of our predefined spacing tokens (0 - 1250).| CSS Shortcut class | Applied style | Legacy property |
|---|---|---|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
Examples
All sides
p-<value>
This element has no padding on all sides.
<p class="p-0">This element has no padding on all sides.</p> Top side
pt-<value>
This element has a padding of —gcds-spacing-300 on the top side.
<p class="pt-300">
This element has a padding of —gcds-spacing-300 on the top
side.
</p> Bottom side
pb-<value>
This element has a padding of —gcds-spacing-300 on the bottom side.
<p class="pb-300">
This element has a padding of —gcds-spacing-300 on the
bottom side.
</p> Left side
ps-<value>
This element has no padding on the left side.
<p class="p-300 ps-0">
This element has no padding on the left side.
</p> Right side
pe-<value>
This element has no padding on the right side.
<p class="p-300 pe-0">
This element has no padding on the right side.
</p> Horizontal sides
px-<value>
This element has a padding of —gcds-spacing-600 on the left and right sides.
<p class="px-600">
This element has a padding of —gcds-spacing-600 on the
left and right sides.
</p> Vertical sides
py-<value>
This element has a padding of —gcds-spacing-500 on the top and bottom sides.
<p class="py-500">
This element has a padding of —gcds-spacing-500 on the top
and bottom sides.
</p> xs:> 480pxsm:> 640pxmd:> 768pxlg:> 1024pxxl:> 1280px
<div class="xs:p-300 ...">
...
</div>