Add spacing to an element with margin (m), padding (p) and offset (o) utilities.
Pattern: <prefix><location>-<size>@<breakpoint>
- Prefixes:
m
marginp
paddingo
offset
- Locations:
t
topr
rightb
bottoml
leftx
left & righty
top & bottoma
all
- Sizes:
1
through20
- Add
h
for half values. Examples: 0h
0.5 rem3h
3.5 rem12h
12.5 rem
- Breakpoints:
xs
sm
md
lg
xl
xx
Example a: mx-2@md
(margin left & right 2rem at the medium breakpoint)
Example b: mt-14h@lg
(margin top 14.5rem at the large breakpoint)
Flexbox Vertical Positioning
Set vertical positioning on flexbox elements.
+equal
sets element to height of heighest sibling+middle
vertically align children to the middle+bottom
vertically align children to the bottom
Responsive Floats
Set floats by breakpoint.
f--l@md
Left: float left at medium breakpointf--r@md
Right: float right at medium breakpointf--n@md
None: kill all floats at medium breakpoint
Responsive Flexbox Ordering
Responsively set display order of responsive elements.
- (default order is defined by markup)
order--1@md
overrides element's display order to appear first at the medium breakpointorder--2@md
overrides element's display order to appear second at the medium breakpoint- etc
Sticky
Set an element to be sticky
pos--sticky
See Grid page for visual examples.
Font Sizes
Override a text element's size with the font-size (fs) utility:
fs-xs
extra smallfs-sm
smallfs-root
root sizefs-d1
–fs-d7
one through seven scale degrees above root
Font Families
Override a font family style with font-family (ff) utility:
ff-sans
sans (default): Sans serifff-slab
slab: Slabff-serif
serif: Serifff-mono
mono: Monospace
Font Styles and Weights
Override a text's font style (fs) and/or weight (fw):
fs-lead
applies the “lead“ classfw-100
–fw-900
sets font weight to 100 through 900
List Styles
Specify a list style with these...
ls--none
makes an unstyled listls--inline
makes an inline listls--default
resets a nested list to bullets when parent list styled is overridden
Text Alignment
Override a text element's alignment
ta-l
align leftta-r
align rightta-c
align center
Optionally add a breakpoint:
- Example:
ta-l@md
align left at medium screen sizes - Example:
ta-r@lg
align right at large screen sizes
See Typography page for more examples.
Background Image Positions
bg-lt left top |
bg-t center top |
bg-rt right top |
bg-l left center |
default: center center |
bg-r right center |
bg-lb left bottom |
bg-b center bottom |
bg-rb right bottom |
Background Color
Assign a color to a text element (or child text of an element).
Pattern: bg-<color>
bg-blue-dark
: Dark Bluebg-yellow
: YellowOther Background Utilities
bg-fixed
: fixed image backgroundbg-none
: remove background completely
Text Color
Assign a color to a text element (or child text of an element).
Pattern: tc-<color>
- Example a:
tc-teal
Teal Text - Example b:
tc-red
Red Text
See Color Palette page for more examples.
Borders & Corners
coming soon...
Shadows
coming soon...