Skip to content
CSS Transforms

3D transform functions compared

rotate3d, matrix3d and friends, side by side.

Browser support for 3D transforms is excellent today, with a few sharp edges. The main one is that certain properties, such as overflow hidden or some filters, quietly flatten a preserve-3d context. If a face disappears or a block turns flat, look for one of those on an ancestor before you start rewriting your transforms.

At a glance

Engine support
Feature Chrome Firefox Safari
preserve-3d Yes Yes Yes
backface-visibility Yes Yes Prefixed in old versions
individual transform properties Yes Yes Yes

What games already solved

Reading isometric art is a learned skill, and most readers have learned it from games and instruction manuals. That shared vocabulary is what makes the style so friendly. It also means readers notice immediately when something is off, even if they cannot say why, so consistency matters more than detail.

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.

Download

cubefold-grid-templates.zipIsometric grid backgrounds in CSS and SVG. 610 B
Download cubefold-grid-templates.zip

Questions

Is isometric art accessible?

Decorative art is fine when hidden from assistive technology. Informative art needs a text alternative.

How many cubes are too many?

Once the Layers panel shows more than about forty layers, flatten the static parts into SVG.

Why does my cube look flat?

Something on an ancestor, such as overflow: hidden or a filter, is flattening the 3D context.

Which angle should I use?

Use true isometric for CSS and the 2:1 ratio for pixel art. Readers will not notice the difference.

Share

Written by

Mara Lindqvist

Mara draws isometric city blocks in CSS and edits the Isometric Basics column. She once rebuilt a subway map using nothing but borders.

All 13 posts by Mara Lindqvist

11 comments

  1. Tess Walsh

    Short and useful. More quick tips like this, please.

    Reply to Tess Walsh
  2. Bea Kowalski

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

    Reply to Bea Kowalski
  3. Ivo Petrov

    The part about layer counts was eye-opening. Our landing page had over a hundred.

    Reply to Ivo Petrov
    1. Mara LindqvistAuthor

      Agreed, this is the part most tutorials skip.

      Reply to Mara Lindqvist
    2. Eli Novak

      Same here. Adding will-change on the wrapper fixed it for me.

      Reply to Eli Novak
  4. Rosa Medina

    I tried this on an old iPad and one of the faces flickers on hover. Any idea why?

    Reply to Rosa Medina
  5. Chen Wei

    Tiny typo in the second code block: the unit is missing on the translate value.

    Reply to Chen Wei
  6. Dana Ortiz

    Is there a way to do the shadow without a pseudo-element? Our CMS strips empty spans.

    Reply to Dana Ortiz
  7. Alex Moreau

    We used the grid background on our docs site and it looks great with a dark theme too.

    Reply to Alex Moreau
  8. Quinn Adler

    This is the clearest explanation of draw order I have read.

    Reply to Quinn Adler
    1. Nina Ahlberg

      Good question. Usually that means something is flattening the 3D context; check for overflow hidden on a parent.

      Reply to Nina Ahlberg

Leave a comment

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