Skip to main content
Postcard

Style guide · v0.4

Postcard

The look of the Parks Tour: warm paper, soft pastel fills, deep slate ink and one terracotta accent. Things are rounded, they lean a little, and they press down when you touch them. Plain CSS and a few vanilla helpers, ready to carry into any framework.

  • 3 themes
  • 2 typefaces
  • AAA text contrast
  • 0 dependencies
  • 1 accent

Principles

What makes it feel like a postcard, and what keeps it easy to read.

  • ♥

    One strong colour

    Terracotta marks the thing to do next and where you are. Everything else is paper, ink and soft pastels.

  • ↻

    Things lean

    Stamps sit at −4°, cards wobble when you reach for them, the mark tips its hat. A little tilt, used in a few places.

  • ↓

    Pressable

    Buttons and pills sit on a short hard shadow and sink into it when pressed, like a key.

  • Aa

    Readable first

    Body and muted text reach 7:1 contrast in every theme. Targets are at least 44px. Motion stops when you ask it to.

Colour

Every colour is a token. Switch to Dusk at the top to see them all change together.

Surfaces and ink

    Pastels, each with its ink

      Each pastel has an -ink that reaches 7:1 on it. They double as meanings: success is sage, info sky, warning butter and danger rose.

      A colour per day

      dayColor(i, total) spreads items round the hue wheel from terracotta through sage and sky to lilac. Set the result as --pc-c and stamps, cards, tags and the rail tint themselves from it.

      Type

      Fraunces at its softest, with a touch of wonk, for headings. Figtree for everything else.

      Fraunces · SOFT 100 · WONK 1

      Wild & wonky

      Rounded terminals and a few wayward letters. Use it for titles and numbers on stamps, never for long text.

      Figtree · 400 to 750

      Plain, friendly, clear.

      For reading and for controls. Weights: 400 for text, 600 for labels, 650 for buttons, 750 for small capitals.

      Scale

      • --pc-text-3xlA tour of the parks
      • --pc-text-2xlSnowdonia, day two
      • --pc-text-xlOver the Horseshoe Pass
      • --pc-text-lg18 days from Pembrokeshire to the Cairngorms and back
      • --pc-text-readLong reading sits at 17px with 1.6 line height
      • --pc-text-baseInterface text, 16px
      • --pc-text-smControls and chips, 13px
      • --pc-text-xsDates and small facts, 12px
      • .pc-labelGroup labels, 11px capitals

      Reading

      Day 7 · Tue 15 Sept

      Yorkshire Dales to the Lake District

      The morning started in drizzle at Hawes and finished in sunshine on the shore of Ullswater. In between: Buttertubs Pass, a tea stop in Sedbergh, and a long climb out of Kirkby Stephen with the whole of the Eden valley below.

      The Dales do a very particular green after rain.
      • 142 miles, 6 hours in the saddle
      • Two national parks in one day

      Icons

      Line drawings on a 24px grid with 2px rounded strokes, drawn like the round mark. They take the text colour and size.

        <svg class="pc-icon" aria-hidden="true"><use href="icons/icons.svg#pc-globe" /></svg>

        Each icon is also a separate file in dist/icons/ after a build. An icon with no visible label needs one on its button: aria-label="Search".

        Shape and motion

        Round corners, short hard shadows, a little tilt and a little bounce.

        xs · 6
        sm · 12
        base · 20
        lg · 26
        pill
        press
        shadow
        tilt −4°
        • Phone up to 30rem
        • Tablet up to 48rem
        • Wide from 68rem

        --pc-ease-bounce overshoots a little: for things that arrive. Everything else eases plainly in 0.15 to 0.4s. With reduced motion switched on, it all stops.

        Buttons

        Pills on a pressed shadow. One primary per view.

        Tags, chips and badges

        Facts in pastels, filters you can toggle, counts.

        • 18 days
        • 2,448 miles
        • 15 national parks
        • 459 photos
        • 1 story
        • 2 punctures
        • Plain
        • Day colour
        • small
        Show on the map
        Live from the road

        Forms

        Visible labels, a hint where it helps, and errors that say how to fix them.

        Get the next story by email

        One email when a new story goes out, nothing else.

        That postcode is too short. It looks like LL55 4UR.

        Up to 200 characters.

        Error summary

        Submit it empty. The summary takes focus so it's read out first, and each link puts you in its field.

        Questions, counts, files and dates

        How should distances show?

        You can change this later in the settings.

        You can enter up to 120 characters

        When did you set off?

        For example, 9 9 2026

        Stamps and cards

        The postage stamp is the signature piece. Cards you can open lift and wobble.

        Day1 Day3 7 Day12 4 5 18

        Postcards

        Banner

        Day8

        Plain cards

        A plain card

        For a form, a note, a group of settings. A border and nothing else.

        Sunk

        Pressed into the page: for something secondary, like code or a summary.

        Air mail

        The striped edge, for one special thing: the welcome, a thank-you.

        Tables

        For real tabular data. Numbers line up; a wide table scrolls inside its card on a phone.

        The first week
        DayDateMilesRidingPhotos
        Week one70127 h 15198

        Show and hide

        Built on the native details element: it opens with the keyboard and works without JavaScript.

        How are the miles counted?

        From the GPS track, after dropping every point inside a privacy zone. Ferry crossings aren't counted.

        3Snowdonia · Day 1
        Fri 11 Sept · 4 events

        Up the Llanberis Pass in cloud, down the other side in sun. Lunch at Pen-y-Gwryd.

        4Snowdonia · Day 2
        Sat 12 Sept · 6 events

        A loop of the Lleyn peninsula and the coast road to Barmouth.

        5Snowdonia → Peak District
        Sun 13 Sept · 3 events

        Horseshoe Pass, Llangollen, then the long way round Manchester to Edale.

        Summaries

        Facts as labels and values, and a panel to say something's done.

        Route
        Hawes to Pooley Bridge
        Distance
        142 miles
        Riding time
        6 h 05
        Change riding time
        Parks
        Yorkshire Dales, Lake District
        Days
        18
        Miles
        2,448
        Parks
        15
        Photos
        459

        You're subscribed

        We've sent a link to you@example.com. Click it to confirm, and the next story will come to you.

        Photos

        A figure with a caption, a printed snapshot, and a gallery that opens in a lightbox.

        Rolling green hills under a pale sky
        Buttertubs Pass, 11:42 on day 7
        A lake below steep hills
        Ullswater, finally sunny

        Gallery

        Click a photo: ← and → move through them, swipe on a phone, Esc closes and puts you back on the photo you opened.

        Charts

        Colours for data that stay apart from each other and readable on paper and dusk.

        Categories: riding time by road

          Sequential: photos per hour

          nonelots

          Diverging: gradient

          downhillflatuphill

          --pc-chart-1 to -6 for categories, --pc-seq-1 to -5 for amounts, --pc-div-1 to -5 for above and below a middle. Every mark reaches 3:1 on paper. A chart library can read them with token('chart-1').

          Feedback

          Notes, toasts, tooltips, waiting and empty states. Said plainly.

          Tiles are loading. The terrain sharpens as you zoom in.

          Subscribed. Check your inbox and click the link to confirm.

          No signal on day 11. The route between Glencoe and Fort William is drawn from the plan, not GPS.

          Tip: press ← and → to move between days.

          ?

          No stories yet

          Stories you write from the road show up here, in the order you rode them.

          Dialogs and sheets

          The native dialog, softened backdrop and all, and a bottom sheet for phones.

          Parks Tour 26 · September 2026

          Follow the trip by email?

          Each new story from a motorcycle tour of Britain's national parks, sent to your inbox as it goes out. One email per story, nothing else.

          Night

          Panels over the 3D globe swap to hologram colours. Add pc-theme-night to any container.

          Customise the globe

          Colour the route by
          Layers

          Accessibility

          Built in, so each app doesn't have to remember it.

          • Skip link

            Press Tab on this page: a "Skip to main content" pill drops in at the top. Put .pc-skip-link first in the body.

          • Contrast

            Text reaches 7:1 in Paper and Dusk, and npm run check fails the build if a change breaks that.

          • High contrast

            In Windows Contrast themes, pills, tags and cards get real borders, and selected things use the system highlight.

          • Keyboard and motion

            Every control has a visible focus ring and a 44px target. Tabs and menus follow the arrow-key patterns. Reduced motion stops the wobble.

          • Print

            On paper: black ink on white, no floating bars or buttons, every section open, and cards that don't split across pages.

          Using it

          Plain CSS classes and custom properties, so any framework can use them as they are.

          npm install @jonibach/postcard    or    <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@jonibach/postcard@0.2/dist/postcard.css">
          
          <a class="pc-postcard" href="/day/1" style="--pc-c: #d97757">
            <span class="pc-postcard__art">
              <span class="pc-stamp pc-stamp--solid"><small>Day</small>1</span>
            </span>
            <span class="pc-postcard__body">
              <span class="pc-postcard__meta">Wed 9 Sept</span>
              <span class="pc-postcard__title pc-display">Setting off</span>
            </span>
          </a>

          The README covers the whole kit, and docs/porting.md shows the same card in React, Svelte, Vue and Tailwind.