All posts
Web / 3D

WebKit Previews Spatial CSS, Letting Web Pages Arrange 3D Models With Ordinary Stylesheets

WebKit: spatial CSS developer preview demo

On 16 November 2026, the WebKit team published a developer preview of spatial CSS, a proposed set of CSS features for arranging 3D content on a web page. It ships behind a feature flag in Safari on visionOS 27.3, with an initial focus on the HTML model element, which WebKit says is now available in Safari 27 on all platforms.

Today the model element shows one 3D object in its own box. Spatial CSS is about composing several of them. The starting point is a new declaration, spatial: portal, which turns an ordinary container such as a div into a shared 3D space for the models inside it.

Once models share a portal, the standard CSS transform property moves, rotates and scales them as true 3D transforms. WebKit's example slides two toy blocks apart with translateX values written in centimetres. Because these are normal CSS values, they can be transitioned and animated like any other.

The preview also covers position-anchor for snapping one model to a named point on another, in the way you would slot furniture parts together. There is an @environment-map rule for reusing lighting, a portal-action: orbit setting that lets a visitor orbit the scene, and a requestVolumetricScene() call to open a connected volumetric scene on Vision Pro.

The argument WebKit makes is the interesting part. If 3D layout goes through CSS, a page can use media queries for aspect ratio, colour theme and reduced motion to adapt its 3D content, the same way it adapts everything else. WebKit also stresses that spatial content should not be designed only for headsets, since more and more websites show 3D on phones, tablets and computers.

This is close to home for us. We build 3D configurators and interactive models for the browser, usually with Three.js. A good part of that code does exactly what this proposal describes: placing parts relative to each other, attaching one model to a point on another, and responding to screen size. Doing that in a stylesheet would remove a lot of JavaScript.

It is also a long way from being usable on a client project. This is a proposal, in a limited preview, in one browser engine, on one device, behind a flag. Nothing here should change what anyone builds this year.

To try it on a Vision Pro or in the visionOS Simulator, WebKit gives the path as Settings, Apps, Safari, Advanced, Feature flags, CSS Portals. We will be watching whether other browser engines engage with the proposal, because that decides whether it becomes part of the web or stays a Safari feature.