mirror of
https://github.com/tailwindlabs/tailwindcss.git
synced 2025-12-08 21:36:08 +00:00
3.2 KiB
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 Paddingm Margin-m Negative MarginSide (optional)
All (default)t Topr Rightb Bottoml Leftx Horizontaly VerticalSpace
0 01 0.25rem2 0.5rem3 0.75rem4 1rem6 1.5rem8 2rempx 1pxauto auto (horizontal margins only)