Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[css-transforms] Lifting or recessing elements from the viewport in 3D contexts #9881

Closed
eeeps opened this issue Jan 30, 2024 · 3 comments
Closed

Comments

@eeeps
Copy link
Contributor

eeeps commented Jan 30, 2024

Not sure what spec this belongs in; perhaps this suggestion belongs in the WICG, first? But, here goes nothing:

3D user interfaces benefit greatly from being able to leverage human depth perception to create spatial hierarchies, rather than just using drop shadows and 2D perspective.

For instance, see these examples (1, 2, 3), from this overview of various UX elements present in visionOS.

It would be fantastic to be able to subtly lift or recess elements on the web, using CSS.

@eeeps
Copy link
Contributor Author

eeeps commented Jan 30, 2024

In other words...

Here's a screengrab from a recent WWDC video about designing experiences for spatial interfaces.

Screenshot 2024-01-30 at 15 55 41

The web has a great story for "Spaces" (WebXR), and an evolving one for "Volumes" (<model-viewer> and <model>). But it doesn't have any story at all for that tiny bit of depth exhibited by "Windows".

@eeeps
Copy link
Contributor Author

eeeps commented Feb 1, 2024

The CSS-iest way to do this would be to leverage transforms. Maybe new perspective and perspective-origin values? Adding [css-transforms] to the title.

@eeeps eeeps changed the title Lifting or recessing elements from the viewport in 3D contexts [css-transforms] Lifting or recessing elements from the viewport in 3D contexts Feb 1, 2024
@eeeps
Copy link
Contributor Author

eeeps commented Feb 1, 2024

And now that I'm looking through the existing transforms issues, I found #4242, which defines the same use case and contains years worth of discussions about it. Closing!

@eeeps eeeps closed this as completed Feb 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant