Pasta

Simply Delicious

Page Contents

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--contrast

  • .color__bg--contrast--extra

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--contrast

  • .color__border--contrast--extra

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--contrast

  • Aa

    .color__type--contrast--extra


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__flex align their children by default to a row layout, whereas containers with .flow__grid align 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 gap in 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-auto you have access to --fit__type and --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__type defaults to auto-fit and --column__width defaults to our global width custom property var(--width__xs).

Uses the default properties:

Flow child 1

Flow child 2

Flow child 3

Flow child 4

Flow child 5

Adjusts the --column__width property:

Flow child 1

Flow child 2

Flow child 3

Flow child 4

Flow child 5

Fixed

With .flow__grid--columns-fixed you have access to --columnCount and can control how many repeated columns show up:

grid-template-columns: repeat(var(--columnCount), 1fr);

--columnCount set to 8, creating 8 total columns within the grid parent:

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 order and 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--center

  • 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--left

  • 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--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, size and lineheight, 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, xxxxl

Lineheight: xs, s, m, l, xl, xxl, xxxl, xxxxl

You can mix and match any lineheight value with any size value 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--light

  • 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--normal

  • 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--semibold

  • 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--bold

Note: if using external web fonts, make sure to include the appropriate weights based on the below scale:

ClassWeight
light300
normal400
semibold600
bold700