Design tokens keep the whole team in step. We name colours by their role, such as face-top, face-left and face-right, rather than by hue. When we switched the site to a violet accent for a campaign, only the token values changed. Every illustration, button and chart followed without anyone opening a single component.
A code editor, a modern browser and about twenty minutes. No libraries or build step.
Handling motion
Stacking order is the part that trips people up. In a flat layout, later elements paint on top. In a tilted scene, a block that is further back must paint first, even if it appears later in the markup. Either sort your markup by depth or give each block a z-index derived from its row and column.
Set the unit
Define
--unit: 2remon the scene so every size derives from one value.Build the columns
Read each value from a
data-valueattribute and set the block height withcalc().Label the bars
Keep labels flat and upright below the chart so they stay readable.
Describe the chart
Add a visually hidden table with the same numbers for screen readers.
The code
Performance is rarely a problem for one hero cube, but a scene with fifty transformed blocks is a different story. Each block may become its own compositing layer, and every layer costs memory. Open the Layers panel before you ship and count them. If the number surprises you, flatten the static parts into a single SVG.
Motion adds a lot to isometric scenes, and it is also the fastest way to make someone feel unwell. Wrap every animation in a prefers-reduced-motion query. For readers who ask for less motion we keep the scene still and use a small colour change on hover instead, which keeps the interface responsive without any movement.
Custom properties make isometric CSS far easier to maintain. Instead of hard-coding sizes, we define a single unit on the scene wrapper and multiply it everywhere else. Changing the unit rescales the whole illustration, keeps the proportions intact and means a phone layout needs one media query instead of twenty.
.scene { --unit: 2rem; transform: rotateX(60deg) rotateZ(-45deg); transform-style: preserve-3d;} .cube { width: calc(var(--unit) * 3); aspect-ratio: 1; background: var(--face-top);}
Colours used
Keeping everything on the grid
Accessibility for decorative art is mostly about getting out of the way. If an illustration adds no information, hide it from assistive technology with aria-hidden on its wrapper. If it does carry meaning, such as a chart, give it a text alternative that says what the picture shows, not how it was built.
What you built
- A cube with three shaded faces
- A floor grid from gradients
- A hover state that lifts the block
Alex Moreau
Our designer drew the scene in Figma and I rebuilt it with your approach in an afternoon.
Pia Jensen
Same here. Adding will-change on the wrapper fixed it for me.
Quinn Adler
The templates are in the downloads section of the reference post.
Hana Sato
Glad it helped. The values are in the colour ratios reference.
Lena Vogel
Works nicely in Firefox. Safari needed the prefixed transform-style for us.
Tess Walsh
Tiny typo in the second code block: the unit is missing on the translate value.
Soren Dahl
Love the palette. Could you share the exact lightness values?
Ivo Petrov
The paper cube exercise sounds fun. Are the templates available somewhere?
Dana Ortiz
This finally made the order of rotations click for me. I had them the wrong way round for weeks.