Skip to content

[css-spatial-1] Which way does +y point for transforms in the back spatial context? #172

Open

Description

@cabanier

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.

Which convention should spatial CSS take?

cc @AdaRoseCannon

Activity

  1. AdaRoseCannon commented on Nov 18, 2026

    @AdaRoseCannon
    Contributor

    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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions