Safari in visionOS 27.3 includes a developer preview of Spatial CSS, a WebKit proposal for arranging web content in three dimensions. The initial focus is on objects in the <model> element: the API lets developers group them into portals, move and align them with CSS, and open connected volumetric scenes outside the browser window.
This development does not turn the web into an unrestricted 3D scene. WebKit presents an initial set of declarative properties and APIs for composing objects, while the proposed specification describes a broader spatial layout model. The preview is being released alongside that specification and, for now, is available only in visionOS.
A portal for bringing models together in a scene
The starting point is spatial: portal. When applied to a container such as <div> or <figure>, its child elements share a space. In WebKit’s demo, this space brings together a board and several block-shaped pieces: instead of appearing as isolated models, they can be placed together in the same scene.
Once grouped, the models can be moved, rotated, and scaled with transform. WebKit reuses the syntax and DOMMatrix class used for 2D and pseudo-3D transformations, but within the portal, changes act as real 3D transformations. The demo separates an octagonal piece and a star from the board to show that each object can be moved independently.
To join pieces at specific positions, the proposal adds position-anchor and position-context: anchor. In the example, the board includes two reference points set up in the 3D program: one indicates where each piece fits. This lets the author link a block to the corresponding anchor, rather than copying coordinates from the 3D tool or adjusting its transformations by eye.
These anchors can also be animated, according to WebKit. This makes it possible to maintain the relationship between objects as their positions change—a feature intended for compositions in which pieces move, not just for fixed placement.
Lighting and movement with CSS rules
Lighting is provided through @environment-map. An environment map describes the light reflected by an object—such as the ambient light in a room—and the preview supports 360-degree HDR images. The rule defines a named map in equirectangular format, which the container can then select using the environment-map property.
To let users rotate the scene and view it from different angles, WebKit adds portal-action: orbit. The company says other modes, such as horizontal or vertical panning, could be added, but they are not part of this preview. The feature is reminiscent of the stagemode attribute on the <model> element, although configuring it with CSS offers another way to adapt it to the design.
The proposal retains one of CSS’s usual advantages: the composition can respond to device and window characteristics, such as screen aspect ratio, color scheme, or reduced-motion preference. WebKit argues that moving these decisions into declarative rules can reduce the logic and state the page would otherwise have to manage with JavaScript. It also allows numerical parameters to be animated and transitioned like other CSS values.
The <model> element is already in Safari 27 on all platforms, according to WebKit; the Spatial CSS preview, by contrast, requires visionOS 27.3. The distinction matters: displaying 3D models in Safari is not the same as having the portals and other spatial features now being tested available on all platforms.

From the browser window to the user’s space
The requestVolumetricScene() API lets a page request, in response to a user action, that spatial content leave the portal and appear in the person’s space. WebKit calls this a connected volumetric scene. The user can place it wherever they like, and the page maintains an active link to it: the site can add or remove objects, or change their position.
This link distinguishes the feature from a screenshot or static export. The scene appears outside the window, but WebKit intends for the content to remain connected to the page that created it. The demo proposes launching the request from a button; it does not open automatically when the site loads.
More technical context is available in WebKit’s changes for connected volumetric scenes. WebKit Weekly describes an experimental implementation, disabled by default, that exposes requestVolumetricScene() and exitVolumetricScene() for <model> elements and portals. In visionOS, <model> content is rendered in a separate process, and volumetric presentation moves the context hosting the page layer into a new scene managed by the interface process.
This work adds messages between WebContent, ModelProcess, and UIProcess to enter, exit, and update the scene’s size. It also uses a token to associate scene activation with the request that initiated it. WebKit Weekly details these components as part of the experimental implementation; it does not present them as features available in the public preview independently of visionOS restrictions.
The full proposal goes beyond models
The CSS Spatial Layout draft expands the scope of this initial step. It defines page-type spatial containers, which elevate content in front of the page, and portal containers, which also open up a space behind it. Content that is not spatially positioned continues to participate in the normal 2D layout; depth offset is an option applied to specific elements.
Capabilities described in the draft include inset-front and inset-back, for moving elements inward or outward, and position: spatial-absolute, for placing content in three dimensions outside the normal flow. Depth limits and media queries that adapt the layout to the available space are also proposed. These elements belong to the broader proposal, not to the list of features in the preview announced for visionOS 27.3.
The draft proposes that the browser be able to limit how far content protrudes toward the user, even adjusting this maximum according to context. It also preserves the DOM structure and reading order, and proposes that layouts be able to fall back to 2D on screens without spatial capabilities. WebKit explains that the aim is to keep traditional web content alongside experiences with depth, not to require a fully three-dimensional page.
The proposal is also not presented as a replacement for WebXR or as a system for creating any kind of immersive experience. The draft excludes features such as hand tracking, room-scale interaction, programmable geometry rendering, and physics simulation. Its focus is content layout and spatial decoration integrated with web design.
How to try the preview
Anyone with a Vision Pro or using the visionOS simulator can enable the feature in Settings > Apps > Safari > Advanced > Feature flags > CSS Portals. WebKit also publishes a demo page and notes that Xcode lets users install additional simulators.
WebKit asks developers to try the preview and share their experience. For feedback, it points to Mastodon and X, as well as its bug-tracking system at bugs.webkit.org. The company describes the work as a long journey, with more aspects of the proposed specification still to be developed.
The test is limited to visionOS, but the release accompanies the general rollout of the <model> element in Safari 27. The next concrete step for anyone who wants to evaluate Spatial CSS is to enable CSS Portals and see how their scenes behave on the device or simulator.
Sources: WebKit, Mac to Reality, explainers, WebKit Weekly