Pasta comes bundled with a large variety of utility classes to help you style content, whilst writing less CSS, bon appétit!
Borders
You can easily apply a border to any element—or remove one—by using the following classes:
Addition
.border__all.border__block.border__block-end.border__block-start.border__inline.border__inline-end.border__inline-start
Negation
.border__none.border__block--none.border__block-end--none.border__block-start--none.border__inline--none.border__inline-end--none.border__inline-start--none
Directional options include
block-end, block-start, block, bottom, inline-end, inline-start, inline, left, right, top.
Colors
There are three primary class groups associated with color, bg , border and type—each class affects a different CSS property and can be used together to style an entire element.
Background
.color__bg--base.color__bg--base--ish.color__bg--base--mid.color__bg--base--semi.color__bg--base--light.color__bg--base--ghost
.color__bg--highlight.color__bg--highlight--ish.color__bg--highlight--mid.color__bg--highlight--semi.color__bg--highlight--light.color__bg--highlight--ghost.color__bg--highlight--contrast
.color__bg--contrast.color__bg--contrast--adaptive.color__bg--contrast--fixed.color__bg--contrast--extra
.color__bg--basil.color__bg--basil--ish.color__bg--basil--mid.color__bg--basil--semi.color__bg--basil--light.color__bg--basil--ghost.color__bg--basil--contrast
.color__bg--tomato.color__bg--tomato--ish.color__bg--tomato--mid.color__bg--tomato--semi.color__bg--tomato--light.color__bg--tomato--ghost.color__bg--tomato--contrast
.color__bg--eggplant.color__bg--eggplant--ish.color__bg--eggplant--mid.color__bg--eggplant--semi.color__bg--eggplant--light.color__bg--eggplant--ghost.color__bg--eggplant--contrast
.color__bg--cobalt.color__bg--cobalt--ish.color__bg--cobalt--mid.color__bg--cobalt--semi.color__bg--cobalt--light.color__bg--cobalt--ghost.color__bg--cobalt--contrast
.color__bg--saffron.color__bg--saffron--ish.color__bg--saffron--mid.color__bg--saffron--semi.color__bg--saffron--light.color__bg--saffron--ghost.color__bg--saffron--contrast
.color__bg--valencia.color__bg--valencia--ish.color__bg--valencia--mid.color__bg--valencia--semi.color__bg--valencia--light.color__bg--valencia--ghost.color__bg--valencia--contrast
.color__bg--rose.color__bg--rose--ish.color__bg--rose--mid.color__bg--rose--semi.color__bg--rose--light.color__bg--rose--ghost.color__bg--rose--contrast
Border
.color__border--base.color__border--base--ish.color__border--base--mid.color__border--base--semi.color__border--base--light.color__border--base--ghost
.color__border--highlight.color__border--highlight--ish.color__border--highlight--mid.color__border--highlight--semi.color__border--highlight--light.color__border--highlight--ghost.color__border--highlight--contrast
.color__border--contrast.color__border--contrast--adaptive.color__border--contrast--fixed.color__border--contrast--extra
.color__border--basil.color__border--basil--ish.color__border--basil--mid.color__border--basil--semi.color__border--basil--light.color__border--basil--ghost.color__border--basil--contrast
.color__border--tomato.color__border--tomato--ish.color__border--tomato--mid.color__border--tomato--semi.color__border--tomato--light.color__border--tomato--ghost.color__border--tomato--contrast
.color__border--eggplant.color__border--eggplant--ish.color__border--eggplant--mid.color__border--eggplant--semi.color__border--eggplant--light.color__border--eggplant--ghost.color__border--eggplant--contrast
.color__border--cobalt.color__border--cobalt--ish.color__border--cobalt--mid.color__border--cobalt--semi.color__border--cobalt--light.color__border--cobalt--ghost.color__border--cobalt--contrast
.color__border--saffron.color__border--saffron--ish.color__border--saffron--mid.color__border--saffron--semi.color__border--saffron--light.color__border--saffron--ghost.color__border--saffron--contrast
.color__border--valencia.color__border--valencia--ish.color__border--valencia--mid.color__border--valencia--semi.color__border--valencia--light.color__border--valencia--ghost.color__border--valencia--contrast
.color__border--rose.color__border--rose--ish.color__border--rose--mid.color__border--rose--semi.color__border--rose--light.color__border--rose--ghost.color__border--rose--contrast
Color
- Aa
.color__type--base - Aa
.color__type--base--ish - Aa
.color__type--base--mid - Aa
.color__type--base--semi - Aa
.color__type--base--light - Aa
.color__type--base--ghost
- Aa
.color__type--highlight - Aa
.color__type--highlight--ish - Aa
.color__type--highlight--mid - Aa
.color__type--highlight--semi - Aa
.color__type--highlight--light - Aa
.color__type--highlight--ghost - Aa
.color__type--highlight--contrast
- Aa
.color__type--contrast - Aa
.color__type--contrast--adaptive - Aa
.color__type--contrast--fixed - Aa
.color__type--contrast--extra
- Aa
.color__type--basil - Aa
.color__type--basil--ish - Aa
.color__type--basil--mid - Aa
.color__type--basil--semi - Aa
.color__type--basil--light - Aa
.color__type--basil--ghost - Aa
.color__type--basil--contrast
- Aa
.color__type--tomato - Aa
.color__type--tomato--ish - Aa
.color__type--tomato--mid - Aa
.color__type--tomato--semi - Aa
.color__type--tomato--light - Aa
.color__type--tomato--ghost - Aa
.color__type--tomato--contrast
- Aa
.color__type--eggplant - Aa
.color__type--eggplant--ish - Aa
.color__type--eggplant--mid - Aa
.color__type--eggplant--semi - Aa
.color__type--eggplant--light - Aa
.color__type--eggplant--ghost - Aa
.color__type--eggplant--contrast
- Aa
.color__type--cobalt - Aa
.color__type--cobalt--ish - Aa
.color__type--cobalt--mid - Aa
.color__type--cobalt--semi - Aa
.color__type--cobalt--light - Aa
.color__type--cobalt--ghost - Aa
.color__type--cobalt--contrast
- Aa
.color__type--saffron - Aa
.color__type--saffron--ish - Aa
.color__type--saffron--mid - Aa
.color__type--saffron--semi - Aa
.color__type--saffron--light - Aa
.color__type--saffron--ghost - Aa
.color__type--saffron--contrast
- Aa
.color__type--valencia - Aa
.color__type--valencia--ish - Aa
.color__type--valencia--mid - Aa
.color__type--valencia--semi - Aa
.color__type--valencia--light - Aa
.color__type--valencia--ghost - Aa
.color__type--valencia--contrast
- Aa
.color__type--rose - Aa
.color__type--rose--ish - Aa
.color__type--rose--mid - Aa
.color__type--rose--semi - Aa
.color__type--rose--light - Aa
.color__type--rose--ghost - Aa
.color__type--rose--contrast
Flow
Flow is a general category of classes that help position elements within other elements. It tracks to classes that affect flex and grid properties primarily.
General
To get started you can try out the following classes: .flow__flex, .flow__grid or .flow__inline.
Alignment
After applying the root declaration for flow, you have two directions to flow content inline or block, you can start apply the following classes:
flex
.flow__flex.flow__align--inline-around.flow__flex.flow__align--inline-between.flow__flex.flow__align--inline-center.flow__flex.flow__align--inline-end.flow__flex.flow__align--inline-start.flow__flex.flow__align--inline-stretch
.flow__flex.flow__align--block-center.flow__flex.flow__align--block-end.flow__flex.flow__align--block-start.flow__flex.flow__align--block-stretch
grid
.flow__grid.flow__align--inline-around.flow__grid.flow__align--inline-between.flow__grid.flow__align--inline-center.flow__grid.flow__align--inline-end.flow__grid.flow__align--inline-start.flow__grid.flow__align--inline-stretch
.flow__grid.flow__align--block-center.flow__grid.flow__align--block-end.flow__grid.flow__align--block-start.flow__grid.flow__align--block-stretch
inline
.flow__inline.flow__align--inline-around.flow__inline.flow__align--inline-between.flow__inline.flow__align--inline-center.flow__inline.flow__align--inline-end.flow__inline.flow__align--inline-start.flow__inline.flow__align--inline-stretch
.flow__inline.flow__align--block-center.flow__inline.flow__align--block-end.flow__inline.flow__align--block-start.flow__inline.flow__align--block-stretch
Direction
You can declare the direction children are supposed to flow if overriding the default direciton.
Containers with
.flow__flexalign their children by default to a row layout, whereas containers with.flow__gridalign their children by default to a column layout—plan accordingly!
flex column
.flow__flex.flow__direction--column
flex row
.flow__flex.flow__direction--row
grid column
.flow__grid.flow__direction--column
grid row
.flow__grid.flow__direction--row
Flex Helpers
Pasta includes a few helper classes specifically for flex layouts.
Grow
You can have a flex child grow to fit it’s container with .flow__flex--grow or prevent it from doing so with .flow__flex--grow-no.
Shrink
You can have a flex child shrink within it’s container with .flow__flex--shrink or prevent it from doing so with .flow__flex--shrink-no.
Wrap
You can have a flex container wrap it’s children with .flow__flex--wrap or prevent wrapping with .flow__flex--wrap-no.
Gap
To place space between children in a flow container, you can use the following gap classes:
To set the
gapin both directions (column and row) use the general.flow__gap--${size}, to set the direction separately, you use.flow__gap--column-${size}or.flow__gap--row-${size}individually.Like a lot of other classes, we map over our pre-defined size custom properties to define our list of available sizes, they are:
xxs, xs, s, m, l, xl, xxl, xxxl.
Equal
.flow__gap--xxs.flow__gap--xs.flow__gap--s.flow__gap--m.flow__gap--l.flow__gap--xl.flow__gap--xxl.flow__gap--xxxl
Column
.flow__gap--column-xxs.flow__gap--column-xs.flow__gap--column-s.flow__gap--column-m.flow__gap--column-l.flow__gap--column-xl.flow__gap--column-xxl.flow__gap--column-xxxl
Row
.flow__gap--row-xxs.flow__gap--row-xs.flow__gap--row-s.flow__gap--row-m.flow__gap--row-l.flow__gap--row-xl.flow__gap--row-xxl.flow__gap--row-xxxl
Grid Helpers
Pasta includes a few helper classes specifically for grid layouts.
Columns
In order to declare a grid container as having a series of repeatable columns, you simply add the class .flow__grid--columns-auto or .flow__grid--columns-fixed, each have a few built-in custom-properties to fine-tune the behavior:
Auto
With
.flow__grid--columns-autoyou have access to--fit__typeand--column__width, which changes the default behavior of:grid-template-columns: repeat( var(--fit__type, auto-fit), minmax(var(--column__width, var(--width__xs)), 1fr) );
--fit__typedefaults toauto-fitand--column__widthdefaults to our globalwidthcustom propertyvar(--width__xs).Uses the default properties:
Flow child 1
Flow child 2
Flow child 3
Flow child 4
Flow child 5
Adjusts the
--column__widthproperty:Flow child 1
Flow child 2
Flow child 3
Flow child 4
Flow child 5
Fixed
With
.flow__grid--columns-fixedyou have access to--columnCountand can control how many repeated columns show up:grid-template-columns: repeat(var(--columnCount), 1fr);
--columnCountset to 8, creating 8 total columns within thegridparent:Flow child 1
Flow child 2
Flow child 3
Flow child 4
Flow child 5
Children
Flow children have a special set of classes that apply to them only, you must first declare a flow parent and then apply the respective classes on children.
An example, which offets the
orderand alignment of a child:<section class="border__all color__border--base--light flow__grid flow__align--block-center flow__align--inline-center flow__direction--column flow__gap--l padding__m radius__s" style="block-size: calc(var(--size__xxxl) * 2)" > <p class="color__bg--base--ghost padding__s radius__xs type__align--center"> Flow child 1 </p> <p class="color__bg--base--ghost flow__self--start flow__order padding__s radius__xs type__align--center" style="--order: 3" > Flow child 2 [but I’m at the top/end] </p> <p class="color__bg--base--ghost padding__s radius__xs type__align--center"> Flow child 3 </p> </section>Flow child 1
Flow child 2 [but I’m at the top/end]
Flow child 3
Margin
To work with margin in your project, use the following classes:
Equal
.margin__xxs.margin__xs.margin__s.margin__m.margin__l.margin__xl.margin__xxl.margin__xxxl
Directional, Addition
block
.margin__block--xxs.margin__block--xs.margin__block--s.margin__block--m.margin__block--l.margin__block--xl.margin__block--xxl.margin__block--xxxl
block-end
.margin__block-end--xxs.margin__block-end--xs.margin__block-end--s.margin__block-end--m.margin__block-end--l.margin__block-end--xl.margin__block-end--xxl.margin__block-end--xxxl
block-start
.margin__block-start--xxs.margin__block-start--xs.margin__block-start--s.margin__block-start--m.margin__block-start--l.margin__block-start--xl.margin__block-start--xxl.margin__block-start--xxxl
inline
.margin__inline--xxs.margin__inline--xs.margin__inline--s.margin__inline--m.margin__inline--l.margin__inline--xl.margin__inline--xxl.margin__inline--xxxl
inline-end
.margin__inline-end--xxs.margin__inline-end--xs.margin__inline-end--s.margin__inline-end--m.margin__inline-end--l.margin__inline-end--xl.margin__inline-end--xxl.margin__inline-end--xxxl
inline-start
.margin__inline-start--xxs.margin__inline-start--xs.margin__inline-start--s.margin__inline-start--m.margin__inline-start--l.margin__inline-start--xl.margin__inline-start--xxl.margin__inline-start--xxxl
Directional, Negation
If you need to remove margin from only one direction at a time, you can use the following classes:
.margin__block--none.margin__block-end--none.margin__block-start--none.margin__inline--none.margin__inline-end--none.margin__inline-start--none
Directional options include
block-end, block-start, block, bottom, inline-end, inline-start, inline, left, right, top.
Padding
To work with padding in your project, use the following classes:
Equal
.padding__xxs.padding__xs.padding__s.padding__m.padding__l.padding__xl.padding__xxl.padding__xxxl
Directional, Addition
block
.padding__block--xxs.padding__block--xs.padding__block--s.padding__block--m.padding__block--l.padding__block--xl.padding__block--xxl.padding__block--xxxl
block-end
.padding__block-end--xxs.padding__block-end--xs.padding__block-end--s.padding__block-end--m.padding__block-end--l.padding__block-end--xl.padding__block-end--xxl.padding__block-end--xxxl
block-start
.padding__block-start--xxs.padding__block-start--xs.padding__block-start--s.padding__block-start--m.padding__block-start--l.padding__block-start--xl.padding__block-start--xxl.padding__block-start--xxxl
inline
.padding__inline--xxs.padding__inline--xs.padding__inline--s.padding__inline--m.padding__inline--l.padding__inline--xl.padding__inline--xxl.padding__inline--xxxl
inline-end
.padding__inline-end--xxs.padding__inline-end--xs.padding__inline-end--s.padding__inline-end--m.padding__inline-end--l.padding__inline-end--xl.padding__inline-end--xxl.padding__inline-end--xxxl
inline-start
.padding__inline-start--xxs.padding__inline-start--xs.padding__inline-start--s.padding__inline-start--m.padding__inline-start--l.padding__inline-start--xl.padding__inline-start--xxl.padding__inline-start--xxxl
Directional, Negation
If you need to remove padding from only one direction at a time, you can use the following classes:
.padding__block--none.padding__block-end--none.padding__block-start--none.padding__inline--none.padding__inline-end--none.padding__inline-start--none
Directional options include
block-end, block-start, block, bottom, inline-end, inline-start, inline, left, right, top.
Radius
To work with border-radius in your project, use the following classes:
Equal
.radius__xxs.radius__xs.radius__s.radius__m.radius__l.radius__xl.radius__xxl.radius__xxxl
Directional, Addition
end-end
.radius__end-end--xxs.radius__end-end--xs.radius__end-end--s.radius__end-end--m.radius__end-end--l.radius__end-end--xl.radius__end-end--xxl.radius__end-end--xxxl
end-start
.radius__end-start--xxs.radius__end-start--xs.radius__end-start--s.radius__end-start--m.radius__end-start--l.radius__end-start--xl.radius__end-start--xxl.radius__end-start--xxxl
start-end
.radius__start-end--xxs.radius__start-end--xs.radius__start-end--s.radius__start-end--m.radius__start-end--l.radius__start-end--xl.radius__start-end--xxl.radius__start-end--xxxl
start-start
.radius__start-start--xxs.radius__start-start--xs.radius__start-start--s.radius__start-start--m.radius__start-start--l.radius__start-start--xl.radius__start-start--xxl.radius__start-start--xxxl
Directional, Negation
If you need to remove border-radius from only one direction at a time, you can use the following classes:
.radius__none.radius__end-end--none.radius__end-start--none.radius__start-end--none.radius__start-start--none
Directional options include
bl, bottom-left, bottom-right, br, end-end, end-start, start-end, start-start, tl, top-left, top-right, tr.
Shadows
To provide consistent box-shadows to elements, you can use the simple class of shadow, shadow__all or shadow__none:
Type
Typography is huge part of any web project, use the following classes to manipulate different aspects of type. To test out different typefaces in your project you can use the Type tool.
Alignment
You can adjust text-align property using the following classes:
The quick brown fox jumps over the lazy dog. But has anyone asked why? What motivates the fox—and what makes the dog so lazy—or is the dog simply exhausted?
.type__align--centerThe quick brown fox jumps over the lazy dog. But has anyone asked why? What motivates the fox—and what makes the dog so lazy—or is the dog simply exhausted?
.type__align--leftThe quick brown fox jumps over the lazy dog. But has anyone asked why? What motivates the fox—and what makes the dog so lazy—or is the dog simply exhausted?
.type__align--right
Family
You can adjust font-family property using the following classes:
The quick brown fox jumps over the lazy dog. But has anyone asked why? What motivates the fox—and what makes the dog so lazy—or is the dog simply exhausted?
.type__family--primary(default: sans-serif)The quick brown fox jumps over the lazy dog. But has anyone asked why? What motivates the fox—and what makes the dog so lazy—or is the dog simply exhausted?
.type__family--secondary(default: serif)The quick brown fox jumps over the lazy dog. But has anyone asked why? What motivates the fox—and what makes the dog so lazy—or is the dog simply exhausted?
.type__family--tertiary(default: monospace)
Size
Most common type-related tags including headlines and paragraph tags are already mapped to a default scale, if you’d like to override those defaults or apply the size to something else, use the following classes:
Note: The size classes requires two points of reference to complete,
sizeandlineheight, use the following structure of.type__size—[size]-[lineheight]. Available keys for each attribute are as such:Size:
xxs, xs, s, m, l, xl, xxl, xxxl, xxxxlLineheight:
xs, s, m, l, xl, xxl, xxxl, xxxxlYou can mix and match any
lineheightvalue with anysizevalue to meet the needs of your project.
xxs/xs
The quick brown fox jumps over the lazy dog. But has anyone asked why? What motivates the fox—and what makes the dog so lazy—or is the dog simply exhausted?
xs/s
The quick brown fox jumps over the lazy dog. But has anyone asked why? What motivates the fox—and what makes the dog so lazy—or is the dog simply exhausted?
s/m
The quick brown fox jumps over the lazy dog. But has anyone asked why? What motivates the fox—and what makes the dog so lazy—or is the dog simply exhausted?
m/l
The quick brown fox jumps over the lazy dog. But has anyone asked why? What motivates the fox—and what makes the dog so lazy—or is the dog simply exhausted?
l/xl
The quick brown fox jumps over the lazy dog. But has anyone asked why? What motivates the fox—and what makes the dog so lazy—or is the dog simply exhausted?
xl/xl
The quick brown fox jumps over the lazy dog. But has anyone asked why? What motivates the fox—and what makes the dog so lazy—or is the dog simply exhausted?
xxl/xxl
The quick brown fox jumps over the lazy dog. But has anyone asked why? What motivates the fox—and what makes the dog so lazy—or is the dog simply exhausted?
xxxl/xxxl
The quick brown fox jumps over the lazy dog. But has anyone asked why? What motivates the fox—and what makes the dog so lazy—or is the dog simply exhausted?
xxxxl/xxxxl
The quick brown fox jumps over the lazy dog. But has anyone asked why? What motivates the fox—and what makes the dog so lazy—or is the dog simply exhausted?
Weight
You can adjust the font-weight property using the following classes:
The quick brown fox jumps over the lazy dog. But has anyone asked why? What motivates the fox—and what makes the dog so lazy—or is the dog simply exhausted?
.type__weight--lightThe quick brown fox jumps over the lazy dog. But has anyone asked why? What motivates the fox—and what makes the dog so lazy—or is the dog simply exhausted?
.type__weight--normalThe quick brown fox jumps over the lazy dog. But has anyone asked why? What motivates the fox—and what makes the dog so lazy—or is the dog simply exhausted?
.type__weight--semiboldThe quick brown fox jumps over the lazy dog. But has anyone asked why? What motivates the fox—and what makes the dog so lazy—or is the dog simply exhausted?
.type__weight--bold
Note: if using external web fonts, make sure to include the appropriate weights based on the below scale:
Class Weight light 300 normal 400 semibold 600 bold 700