Skip to content
oxidaseSign in

Space, shape and lines

A 4px spacing scale, one radius scale, three line weights and pages that scroll as documents.

Spacing

Spacing steps in 4 pixel units, named by their pixel value: space.s16 is 16 pixels at the default text size, written in rem so it grows with the reader's font setting. Related things sit closer than unrelated ones; the gap is the grouping.

  1. s22px
  2. s44px
  3. s88px
  4. s1212px
  5. s1616px
  6. s2020px
  7. s2424px
  8. s3232px
  9. s4040px
  10. s4848px
  11. s5656px
  12. s6464px
  13. s8080px
  14. s9696px
  15. s128128px

Stack and Cluster take a spacing step as their gap, so most layouts never write a margin.

Corners

One radius scale. A corner inside a card sits on the card's padding, so inner and outer corners agree.

radius.mark2pxThin marks: bars, ladders, tracks.
radius.cell3pxData cells, swatches and tags in code.
radius.md10pxFields, menus, tooltips and notices.
radius.lg18pxCards, dialogs and popovers.
radius.pillpillButtons, tags, switches and segmented controls.

Lines

Three line strengths, all 1px. Cards separate from the canvas by tone and a hairline, never a shadow.

  • hairlineCard edges and row rules.
  • hairlineStrongTable headers and the resting underline of a link.
  • fieldBorderField edges, at 3:1 or better against their ground.

Page and card

Pages sit in a 1280px wrap between gutters that grow with the screen. Cards share one padding, and grids of cards share one gap, so edges line up from the bar to the foot.

  • layout.page24, 48, 80Page gutters around the 1280px wrap.
  • layout.pad24, 28, 32The one card padding.
  • layout.gap16, 24The gap between cards in a grid.
  • size.measureProse640Reading text.
  • size.measurePage1280The page wrap: Container measure page with page gutters.

Breakpoints

Defined once in @oxidase/ui/media.stylex and used as conditions inside styles. A component whose content needs its own collapse point uses a container query instead of a new width.

  • media.compactBelow 576pxOne column. Tables become cards.@media (max-width: 35.999rem)
  • media.mediumFrom 576pxTwo-column grids and wider gutters.@media (min-width: 36rem)
  • media.navFrom 896pxThe app bar shows its destinations; the bottom tab bar goes away.@media (min-width: 56rem)
  • media.wideFrom 1152pxDetail beside lists, outlines beside long pages.@media (min-width: 72rem)
  • media.xwideFrom 1440pxOnly the widest measures grow.@media (min-width: 90rem)

Controls and density

Controls are 44 pixels tall by default, 32 small and 48 large, and touch targets stay at least 44. Lab and support screens use the console register: <Density mode="console"> sets controls to 32 pixels and tightens rows and cells, with the same type and colors.

Default
  • Export is missing a sessionOpened 2 hours agoOpen
  • Hold phase ended earlyOpened yesterdayWaiting
Console
  • Export is missing a sessionOpened 2 hours agoOpen
  • Hold phase ended earlyOpened yesterdayWaiting

Scrolling

Pages scroll as documents. A region gets its own vertical scroll only when it is a dialog that has to fit the screen, or a console table with a sticky header.

  • Columns use minmax(0, 1fr) so long words and tables shrink instead of pushing the page sideways.
  • Action groups wrap to a second line rather than hiding actions behind a menu.
  • Tab strips that do not fit scroll sideways, with a faded edge that shows there is more.
  • Code samples wrap their long lines inside the block instead of scrolling sideways.

Nothing important lives in a nested scroll area

If content is long, the page is long. Short screens and zoomed text then work without a trap where the wheel scrolls the wrong thing.