Featured Engineering Updated

Shipping a design token pipeline in an afternoon

Priya Raman

Frontend Engineer · Pune

  • Nov 5, 2025
  • 2 min read
  • 8
Shipping a design token pipeline in an afternoon

JSON in, CSS custom properties out, and a build step nobody has to babysit. Good frontend engineering in a design system mostly looks like removing things.

Moving logic into the stylesheet

Moving decisions from JavaScript into CSS made the components easier to reason about. The stylesheet now owns layout, and the script owns behaviour, which sounds obvious until you count how often we had crossed that line.

Studio photograph 4 from the Margin Notes archive
Sketches from the first round of explorations.

The component that started it

The token build runs on every merge and publishes a versioned package. Nobody has to remember to run it, which is the only kind of build step that survives a busy quarter.

Good design is as little design as possible.

Dieter Rams, Ten Principles for Good Design

Testing what the user sees

We replaced most snapshot tests with a handful of visual checks at three container widths. Failures now show a picture of the problem instead of a two-hundred-line diff of class names.

The card component had four layout props and eleven media queries. Rewriting it with container queries left one prop and three rules, and the tests finally described what the card did instead of which breakpoint it was in.

None of this is finished. We will keep adjusting as the product changes, and we will write it down here when something breaks in an interesting way.

As always, the files and notes behind this piece are in the studio archive. Ask and we will share what we can.

If you try any of this on your own team, we would love to hear what went differently. The best notes in this journal started as someone else’s correction.


Found this useful?

Priya Raman

About the author

Priya Raman

Frontend Engineer · Pune

Priya builds the component library and the token pipeline behind it. She is happiest deleting CSS and writing small tools that make reviews shorter.

Related dispatches

All posts

8 comments

Leave a comment

Already have an account? Log in

Your email is never shown.

  • Chiara Bianchi

    Nov 5, 2025

    Would love a follow-up on how the team felt about the change after six months.

  • Rafael Costa

    Nov 10, 2025

    How long did the whole migration take, start to finish?

    Marcus Chen

    Nov 14, 2025

    Good question. I would guess it depends on how many teams consume the system.

  • Femi Adebayo

    Nov 11, 2025

    We shipped the same fix last month. Nice to know we were not the only ones fighting it.

  • Hannah Brooks

    Author's pick Nov 13, 2025

    Did you measure anything before and after? I would love to show numbers to our leadership.

    Priya Raman

    Author Nov 14, 2025

    Fair challenge. In a bigger org I would start with one team and let the results do the persuading.

    Priya Raman

    Author Nov 17, 2025

    Good catch. We tested on a mid-range phone, but I will add a low-end device to the next round.

  • Zara Ahmed

    Author's pick Nov 21, 2025

    Curious how this holds up on low-end Android devices. That is where most of our users are.

Previous

Contrast ratios that pass and still fail

Next

Motion budgets: saying no to the fourth animation