Spacing and shape

Space, corners and shadows are set once and used everywhere, so pages feel consistent without anyone measuring.

Spacing scale

TokenSizeDrawn to size
0px
4px
8px
12px
16px
20px
24px
32px
40px
48px
56px

Running text

Articles, case studies and other long pages space their paragraphs and headings with the flow tokens, so every long page reads the same way.

TokenLightDarkUse
16pxspace.416pxspace.4 Between paragraphs, lists, figures and other blocks
12pxspace.312pxspace.3 From a heading to the text under it
24pxspace.624pxspace.6 Above an h3
32pxspace.832pxspace.8 Above an h2

Corners

Card Button Form field
Card Button Form field
Cards, buttons and form fields each have their own corner
TokenLightDarkUse
8pxradius.sm8pxradius.sm Cards, panels, callouts, dialogs
4pxradius.xs4pxradius.xs Buttons
4pxradius.xs4pxradius.xs Text fields, selects and text areas
4pxradius.xs4pxradius.xs The header search box and the search page's box

Shadows

TokenLightDarkUse
0 1px 2px rgba(21,34,56,0.06), 0 8px 24px rgba(21,34,56,0.06)0 1px 2px rgba(0,0,0,0.3), 0 8px 28px rgba(0,0,0,0.35) Two-layer CSS shadow, stored as a string (the build passes it through as-is)
0 1px 2px rgba(21,34,56,0.06), 0 0 0 1px color-mix(in srgb, var(--somnia-color-action-primary) 14%, transparent), 0 14px 44px color-mix(in srgb, var(--somnia-color-action-primary) 16%, transparent)0 1px 2px rgba(0,0,0,0.3), 0 0 0 1px color-mix(in srgb, var(--somnia-color-action-primary) 26%, transparent), 0 12px 48px color-mix(in srgb, var(--somnia-color-action-primary) 20%, transparent) A soft glow in the brand accent that lifts one feature (the case study mockup) above the page. Use sparingly.

Send feedback

It goes straight to the team building the site, with this page’s address.

What’s it about?

Page: