You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[css-spatial-1] Which way does +y point for transforms in the back spatial context? #172
The draft says portal-transform takes a and that transforms on spatially positioned objects participate in the spatial context's 3D rendering context, but it doesn't say which way the y-axis points.
CSS transforms use y-down coordinates: rotateX(30deg) tips the top of a box away from the viewer and translateY(4cm) moves it down. 3D content (glTF, USD) and most 3D engines use y-up.
Safari's spatial CSS preview evaluates these transforms with y up. In the puzzle playground (https://webkit.org/demos/webkids-puzzle-playground/index.html), portal-transform: rotateX(30deg) auto translateZ(-3cm) tilts the board so it's seen from above, and the block flip keyframes use translateY(4cm) to lift the blocks. With CSS axes, the same values show the board's underside and push the blocks down through it.
This is a really good question. I personally think it should use Y-up to align with the standard set by WebXR since it's working in a space this would be a great discussion topic though.
Can you reproduce the issue in https://github.com/w3c/csswg-drafts/issues (it'll be the first issue for this there) I am still figuring out the best way to move the existing issues from here over.
Activity
AdaRoseCannon commentedon Nov 18, 2026
This is a really good question. I personally think it should use Y-up to align with the standard set by WebXR since it's working in a space this would be a great discussion topic though.
Can you reproduce the issue in https://github.com/w3c/csswg-drafts/issues (it'll be the first issue for this there) I am still figuring out the best way to move the existing issues from here over.
fantasai commentedon Nov 30, 2026
I have the opposite intuition: I think CSS needs to stay consistent with itself. https://www.w3.org/TR/design-principles/#consistency
But, model coordinates would of course work in the direction that the model-defining format defines.
khufu-dev commentedon Dec 2, 2026
Agree, if we use CSS y-down coordinates then it would be easier to stay consistent across the front and back spatial context.