brijr/ds Every styled element

/Demo

Everything ds.css styles. Each class has one behavior; spacing, line height, and columns adapt to the content and the space around it. Gray monospace text names the class or token.

Theme

Text sizes

Body, 16px on 20pxdefault
Dates and meta, 14px on 20px.ds-small
Group label, 12px on 16px.ds-label

Line spacing follows the element

a single line · 20px Names, links, labels, and headings sit on tight lines because they rarely wrap. If one does, it looks like this.
<p> · 24px

Any paragraph gets more room between lines, because paragraphs wrap. There is enough space for the eye to find the next line.

inside .ds-prose · 28px

Articles get the most open lines, so long writing stays comfortable to read for several minutes at a time.

Text classes

Secondary text.ds-muted
Accent text.ds-primary
Medium weight.ds-medium
A long title that is cut off with an ellipsis when it runs out of room on the line.ds-truncate
Screen-reader text is hidden here (hidden).ds-sr-only

Space (4px grid)

--ds-space-1 · 4
--ds-space-2 · 8
--ds-space-3 · 12
--ds-space-4 · 16
--ds-space-6 · 24
--ds-space-8 · 32
--ds-space-12 · 48
--ds-space-18 · 72

Colors

Background--ds-background
Foreground--ds-foreground
Muted--ds-muted
Muted text--ds-muted-foreground
Border--ds-border
Primary--ds-primary

Masthead and crumb

Stack spacing adapts

.ds-stack of items · 12px

First item

Second item

Third item

.ds-stack led by a .ds-label · 8px under the label
Label

First item

Second item

.ds-stack of groups · 24px
Group one

Items inside a group stay 12px apart.

Group two

Groups are 24px apart, so they read as separate.

Row and cluster

.ds-row · title gives way, date stays whole
Mac for Web Development, a longer title to show how it gives wayOctober 4, 2026

Aside

.ds-aside · beside when there's room, stacked when not
2026
Supermetal

Designed and built the marketing site and docs for a data replication platform.

2025
Browserbase

Brand and product design for a headless browser platform.

2024
Craft

An open-source design system for building layouts and handling prose in React.

Grid

.ds-grid · two equal columns, one on phones
Item 1
Item 2
Item 3
Item 4

Prose

.ds-prose · every element markdown can produce

Heading one

Body text in prose sits on 28px lines, capped at about 70 characters. It can hold strong text, emphasis, an inline link, inline code, a key like ⌘K, sample output like 200 OK, small print, a footnote1, and H2O, all without making any line taller.

A second paragraph shows the 16px gap between blocks. Every block gets the same space above it, whatever comes before it.

Heading two

Headings get 32px above and 8px below, so each one groups with the text it introduces.

Heading three

Smaller headings get 24px above and 4px below.

Heading four

Heading four text.

Heading five

Heading five text.

Heading six

Heading six text.

Lists

  • An unordered list item
  • A second item with a nested list
    • Nested items get a lighter dot
    • A second nested item
      • Third level, lighter still
  • A third item
  1. An ordered list item
  2. A second item with a nested list
    1. Nested items use letters
    2. A second nested item
      1. Third level uses roman numerals
  3. A third item
Definition term
The definition sits right under its term, in muted text.
Another term
Terms after the first get 12px above.

Code

A code block uses a light fill. Long lines wrap instead of scrolling, so the block never adds a scrollbar.

:root {
  --ds-primary: light-dark(#ff5c00, #ff5c00);
  --ds-prose: 32rem; /* a long comment that wraps onto a second line on narrow screens */
}

Quote

Good design is as little design as possible. Less, but better, because it concentrates on the essential aspects.

Quotes can hold more than one paragraph.

Table

ElementSizeLine
Body16px20px
Paragraph16px24px
Prose16px28px

Media

Placeholder landscape
A figure caption sits 8px under its image, in small muted text.

A divider follows. It has 32px above and below.


Text after the divider.

Details and summary

Content inside a details element gets the same 16px flow spacing.

Headings outside prose

h1–h6 look like body text; use them for meaning

Heading one through six all look like this

Focus

:focus-visible · press Tab to see the outline