Skip to main content

Padding

Stacks provides atomic classes to override padding.

Immutable padding utilities are based on a global white space scale defined with custom properties. These can dramatically help reduce the size of large stylesheets and allow for greater flexibility and quicker iteration when designing in the browser.

Padding should never be declared outside of these utilities. This is meant to help create consistency and avoid magic numbers. If, for some reason, the default white space scale does not suit your design, customize and extend it before use.

Abbreviation Property Responsive?
p padding
pt padding-top
pr padding-right
pb padding-bottom
pl padding-left
px padding x-axis
py padding y-axis
<div class="pt4 pr64 pb64 pl64">

</div>
Example div with different paddings applied
0 1px 2px 4px 6px 8px 12px 16px 24px 32px 48px 64px 96px 128px 50% 100%
p .p0 .p1 .p2 .p4 .p6 .p8 .p12 .p16 .p24 .p32 .p48 .p64 .p96 .p128 .p50 .p100
pt .pt0 .pt1 .pt2 .pt4 .pt6 .pt8 .pt12 .pt16 .pt24 .pt32 .pt48 .pt64 .pt96 .pt128 .pt50 .pt100
pr .pr0 .pr1 .pr2 .pr4 .pr6 .pr8 .pr12 .pr16 .pr24 .pr32 .pr48 .pr64 .pr96 .pr128 .pr50 .pr100
pb .pb0 .pb1 .pb2 .pb4 .pb6 .pb8 .pb12 .pb16 .pb24 .pb32 .pb48 .pb64 .pb96 .pb128 .pb50 .pb100
pl .pl0 .pl1 .pl2 .pl4 .pl6 .pl8 .pl12 .pl16 .pl24 .pl32 .pl48 .pl64 .pl96 .pl128 .pl50 .pl100
px - .px1 .px2 .px4 .px6 .px8 .px12 .px16 .px24 .px32 .px48 .px64 .px96 .px128 - -
py - .py1 .py2 .py4 .py6 .py8 .py12 .py16 .py24 .py32 .py48 .py64 .py96 .py128 - -
How’d we do?
Anonymously upvote, downvote, or send additional feedback below.
Deploys by Netlify