Skip to content
CSS Transforms

Screencast: debugging preserve-3d

Why a face disappears, and how DevTools shows you the culprit.

The best way to learn isometric CSS is to rebuild something you see every day. A mug, a keyboard key or a stack of books all make good first projects. They are simple enough to finish in an evening, and each one teaches a different trick, from rounded tops to repeating elements.

Clip: Big Buck Bunny, (c) Blender Foundation, CC BY 3.0. Keyboard: Space play or pause, skip 5 seconds, M mute, F full screen.

Making it accessible

Responsive isometric scenes need a plan for narrow screens. Sometimes the answer is to scale everything down with clamp(), and sometimes it is to hide secondary blocks entirely. What rarely works is letting the scene overflow sideways, which makes the page scroll horizontally and feels broken on a phone.

We prototype every scene on paper first. A sheet of triangle-grid paper, a soft pencil and ten minutes are enough to find out whether a composition works. It is far cheaper to erase a pencil line than to rewrite a dozen nested transforms, and the sketch doubles as documentation when someone asks why a block sits where it does.

Workshops taught us more than any tutorial. Watching people fold paper cubes and then rebuild them in CSS showed exactly where the mental model breaks: the order of rotations, the origin of each face, and the moment a block turns inside out. Most of our tutorials now start with the paper version for that reason.

Share

Written by

Theo Okafor

Theo writes about 3D transforms and rendering performance. He keeps a spreadsheet of every browser bug he has hit with preserve-3d.

All 18 posts by Theo Okafor

2 comments

  1. Farah Aziz

    Love the palette. Could you share the exact lightness values?

    Reply to Farah Aziz
  2. Chen Wei

    Great write-up. Would love a follow-up on doing the same thing with SVG.

    Reply to Chen Wei

Leave a comment

Your email address won’t be published. Required fields are marked.