On November 16, 2026, WebKit shipped a developer preview of Spatial CSS, a set of declarative properties for describing three-dimensional web content. The preview builds on a specification still under discussion in the CSS Working Group and, for now, focuses on the model element. It ships in Safari 27.3 on visionOS, on both Vision Pro and the simulator bundled with Xcode. WebKit’s stated goal is to treat 3D scenes like any other page content: with media queries, transitions, and plain CSS syntax rather than a dedicated JavaScript library.
A young specification, a narrow testing ground
Spatial CSS is not a finished standard: the css-spatial-1 specification is still a draft, and WebKit warns that property names and behavior may change before wider adoption. The preview does not touch Safari on macOS or iOS, nor any other rendering engine. It targets visionOS exclusively, making it an experimentation ground rather than a production-ready feature.
The properties introduced by the preview
Spatial CSS rests on a handful of declarations that turn an ordinary container into a shared space for 3D models, then position, anchor, and light them.
| Declaration | Role |
|---|---|
spatial: portal | Turns a container (div, figure) into a shared space for its child models |
transform | Moves, rotates, and scales a model in real three dimensions |
anchor-name / position-anchor | Anchors a model to a named point on another model |
@environment-map | Declares a reusable equirectangular HDR lighting map |
portal-action: orbit | Rotates the scene around the user |
requestVolumetricScene() | Moves the scene out of the browser and into the user’s physical space |
An example: portal, anchoring, and lighting
WebKit’s example places several models inside a shared portal, anchors one to another, then applies a named environment map for lighting:
.world {
spatial: portal;
}
.world .board {
anchor-name: --board;
}
.world .octagon {
position-anchor: --board#octagon-position;
position-context: anchor;
transform: translateX(-50cm);
}
@environment-map spooky {
name: spooky;
format: equirectangular;
src: url(night.hdr);
}
.world.spooky {
environment-map: spooky;
}The preview stays confined to the model element and to visionOS, but it lays the groundwork for a CSS syntax that describes spatial scenes without a dedicated JavaScript library.
How to enable and test the preview
On a Vision Pro, enabling it means going to Settings, then Apps, Safari, Advanced, Feature Flags, and switching on CSS Portals. The same path works in the visionOS simulator once it has been installed through Xcode. WebKit offers a demo, a shape-fitting puzzle called “webkit-puzzle-playground,” to see the portal and anchoring behavior without writing any code.
requestVolumetricScene() method must be triggered by a user action, such as a click: an automatic call on page load is ignored by the browser.For teams working on product visualization or 3D configurators, the appeal of Spatial CSS mostly lies in reusing mechanisms already familiar from design-token systems: variables, media queries, transitions. It remains, though, a 2027 research track rather than a production tool, and the recent history of Safari’s experimental previews shows that several beta cycles often pass before a feature ships outside a flag.
Key takeaways
Spatial CSS sits at the developer-preview stage, limited to visionOS and to the model element. The underlying specification is not stable, and no timeline for extending it to other platforms has been shared. Front-end teams interested in declarative 3D are better off tracking the css-spatial-1 spec than expecting production support any time soon.
Apple has a habit of testing its riskiest bets on visionOS before rolling them out more broadly, as it did with several augmented-reality APIs. Spatial CSS has all the traits of a trial balloon: an elegant declarative syntax, but a Vision Pro user base still too small to justify an immediate production investment — worth following over time rather than adopting right now. — Simon Janvier
Further reading: the official announcement on the WebKit blog.
