Padding
Padding controls the breathing room inside an element — the space between the element’s edge and its content. Use it to keep text from touching borders and to make sections feel more comfortable to read.
Usage
Use numbers when you want to control spacing in simple steps.
- All sides:
padding-0topadding-99 - Per side:
padding-top-0topadding-top-99,padding-right-0topadding-right-99,padding-bottom-0topadding-bottom-99,padding-left-0topadding-left-99
Numbers make the spacing bigger or smaller in simple steps, and they still scale with the screen.
Examples
<div class="padding-6">
<h2 class="padding-bottom-2">Title</h2>
<p class="padding-top-12 padding-left-4">Paragraph with custom spacing.</p>
</div>
- Valid values: Whole numbers only (0–99). Leading zeros are OK (
padding-02is the same aspadding-2). - Invalid values:
padding-100,padding-2.5,padding--1,padding-xx.