Skip to content

Commit ef017d6

Browse files
Update explainer with feedback from readers (#128)
* Feedback from group * Update css-spatial/explainer.md Co-authored-by: fantasai <fantasai.bugs@inkedblade.net> * Update css-spatial/explainer.md Co-authored-by: fantasai <fantasai.bugs@inkedblade.net> * Ellipsis and whitespace --------- Co-authored-by: fantasai <fantasai.bugs@inkedblade.net>
1 parent d5eed14 commit ef017d6

1 file changed

Lines changed: 11 additions & 7 deletions

File tree

css-spatial/explainer.md

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -120,9 +120,11 @@ There are two types of spatial containers:
120120
</figure>
121121

122122
- **`portal`**: Creates a *front spatial context* just like `spatial: page`,
123-
but also creates a *back spatial context* creating space behind the element,
123+
but also creates a *back spatial context* creating space behind the element,
124124
connected through a “portal” that coincides with the element's border rectangle.
125125
The portal acts like a window into this infinite, independent 3D world behind the page.
126+
The opaque backdrop of this world is taken from the 'background-color' property,
127+
and it is lit as specified by a new 'environment-map' feature.
126128
Good for product viewers, 3D scenes, and immersive content.
127129

128130
<figure style="max-width: 200px;">
@@ -157,9 +159,7 @@ content is otherwise laid out as normal.
157159
```
158160

159161
The `.viewer` element cuts a window into its own 3D space.
160-
The `<figure>` element is taken out of flow and positioned within that world.
161-
The `<h2>` renders over the portal it is level with the web page,
162-
with the 3D content visible behind it.
162+
The `<h2>` is pushed 1cm into the portal.
163163

164164
### Raising Content Off the Page: Spatial Relative Positioning
165165

@@ -205,10 +205,14 @@ without clipping content that would exceed it.
205205
}
206206
```
207207
```html
208-
<div class="card">
209-
<img class="thumbnail" src="photo.jpg" alt="Photo">
210-
<p>A raised card effect</p>
208+
209+
<div class="tab active">
210+
<div class="card">
211+
<img class="thumbnail" src="photo.jpg" alt="Photo">
212+
<p>A raised card effect</p>
213+
</div>
211214
</div>
215+
212216
```
213217

214218
When the user hovers over the card,

0 commit comments

Comments
 (0)