tailwindcss/docs/source/docs/spacing.blade.md
2017-11-01 21:19:00 -04:00

3.2 KiB

extends title
_layouts.documentation Spacing

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
Side (optional)
  All (default)
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
px 1px
auto auto (horizontal margins only)