What if laying out 3D objects on a web page felt like writing ordinary CSS? That is the idea behind spatial CSS, a developer preview the WebKit team introduced this week. It lets designers arrange 3D models in a shared space using familiar properties such as transform and anchor positioning.
Where you can try it
The preview runs only in Safari on visionOS 27.3, behind a feature flag called CSS Portals, found under Safari’s advanced feature flags. Developers can test it on Apple Vision Pro or in the visionOS Simulator in Xcode. It works only with the HTML model element, which displays 3D models such as USDZ files.
The new building blocks
The main concept is a portal. Setting spatial: portal on a container turns it into a shared 3D space. Inside it, designers can move models with 3D transforms using real-world units, for example translating a model by 50 centimeters.
Models can be anchored to points inside other models with anchor-name, position-anchor and a new position-context value, reusing ideas from CSS anchor positioning. A new @environment-map rule and environment-map property light a scene with a 360-degree HDR image. A portal-action: orbit setting lets viewers rotate the scene, and a JavaScript method can move the scene out of the browser into the user’s room after a user action.
A proposal, not a standard
The specification is an Editor’s Draft called CSS Spatial Layout Module Level 1, edited by two Apple engineers. It is a proposal, and no other browser maker is named as supporting it yet. That means you should not plan production work around it.
Why designers should pay attention
Even as an experiment, spatial CSS shows a direction: 3D content treated as part of normal layout rather than as a separate WebGL canvas. If it moves forward, designers could use the skills they already have, such as positioning, anchoring and transforms, to build product viewers or room-scale experiences.
Also from WebKit this week
Safari Technology Preview 257, released on November 18, focuses on fixes, including animation support for ::first-letter and ::first-line, better rounding in flexbox and grid, and fixes for text-box-trim and line-clamp.
Sources:




