tailwindcss/docs/source/docs/spacing.blade.md
2017-10-31 16:52:22 -04:00

2.8 KiB

extends title
_layouts.documentation Padding

Spacing

Utilities for controlling an element's padding and margin.

@include('_partials.feature-badges', [ 'responsive' => true, 'customizable' => true, 'hover' => false, 'focus' => false ])

@include('_partials.work-in-progress')

Control an element's padding and margin using the .p{side?}-{size}, .m{side?}-{size}, and .-m{side?}-{size} utilities.

For example, .pt-2 would add .5rem of padding to the top of the element, .mx-0 would make the horizontal margin zero, and .-mb-6 would add a 1.5remnegative margin to the bottom of an element.

Class
p Padding
m Margin
-m Negative Margin
Position (optional)
t Top
r Right
b Bottom
l Left
x Horizontal
y Vertical
Space
0 0
1 0.25rem
2 0.5rem
3 0.75rem
4 1rem
6 1.5rem
8 2rem