OrionReed / dom3d

Browser extension to view and debug the DOM in 3D space.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

X/Y layout changes when transform is applied

OrionReed opened this issue · comments

Ideally the layout should remain entirely unchanged while the Z-axis transforms are applied.

  • The body transform is set to rotateX(${state.rotationY}deg) rotateY(${state.rotationX}deg) scale(${state.zoomLevel})
  • Each node transform is set to translateZ(${THICKNESS}px) which is relative to its parent, leading to the stacking effect.

The issue is that other layout is affected by these transformations, as in this example below. I've slowed down the transformation for the layout change to become more apparent. These transforms are part of the CSS Transforms Module 2 spec, but I haven't found how/why they are affecting the rest of the layout

Screen.Recording.2024-03-29.at.03.45.28.mov