dom debugging

dom3d

the rendered dom as stacked plates — every visible element pushed out of the page by its nesting depth. the firefox devtools "tilt" view, removed in 2017, rebuilt as a zero-dependency library. css 3d transforms, no webgl, ~10 kb.

tilt this page export png

this page is the specimen. everything below is built from the same design system every app here renders, so tilting it shows you the shell, the cards and the controls as plates.

heatmaps

colour answers a question. that is the whole point — it is a debugging tool, not a toy.

modecolours bythe question it answers
depthnesting depthhow deep is this tree, really?
subtreedescendant countwhich subtree is 4000 nodes?
zindexz-index / stacking contextswhere do my layers actually sit?
tagstag categorywhat is this page made of?

specimen

nested on purpose — cards inside a grid, a stacking context, a shadow root, a form. tilt the page and this is the interesting part.

001 live

nested card

text with bold and italic inside it, then a list:

  • one
  • two
  • three
depthplates
stacking contexts
z-index: 1
z-index: 5
z-index: 20
z-index: -1

switch to zindex and these separate out.

shadow root

shadow roots and same-origin iframes are traversed too.

controls
curious3ddeep
facts
body0 · root plate
main1 · column
dv-card3 · surface
li5+ · deep leaf
iframe

controls

inputaction
dragorbit
shift-drag · right-dragpan
wheelzoom
double-clickreset the view
hover · clickinspect · pin and log to console
alt-clickjump to the element on the page
14 · e · xheatmap mode · extrude · export png
escclose

use it anywhere

no build step, no dependencies. drop the script on a page and call it.

<script src="https://dom3d.mianda.dev/dom3d.js"></script>
<script>DOM3D.toggle()</script>
DOM3D.show({
  mode: 'depth',    // depth | subtree | zindex | tags
  extrude: false,   // side walls — the true tilt look
  spacing: 14,      // px per nesting level
  maxTiles: 3000    // safety cap for huge pages
})
DOM3D.setMode('subtree')
DOM3D.exportPNG()   // downloads; pass false for a dataURL
DOM3D.hide()

or keep it in the bookmarks bar and tilt any page you are looking at — drag this up:

dom3d