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-sizing-4] 'screen' or 'viewport' as possible value for aspect-ratio #6392

Closed
Th3S4mur41 opened this issue Jun 17, 2021 · 5 comments
Closed
Labels
Closed as Question Answered Used when the issue is more of a question than a problem, and it's been answered. css-sizing-4

Comments

@Th3S4mur41
Copy link

The current specification for aspect-ratio allows explicit ratios, or the "natural" aspect ratio from a replaced element. There is however no way to follow the viewport's aspect-ratio.

Wouldn't it be nice to be able to do something like aspect-ratio: screen?

Not sure if screen or viewport would be the best value here though?!

@SebastianZ
Copy link
Contributor

What would be the use cases for having an aspect ratio of the screen or the viewport?

Sebastian

@Loirooriol
Copy link
Contributor

Why not aspect-ratio: calc(1vw / 1vh)?

@jonjohnjohnson
Copy link

Why not aspect-ratio: calc(1vw / 1vh)?

And even more so with the new dv* & sv* units? #4329 (comment) / #6113 (comment)

@Th3S4mur41
Copy link
Author

@SebastianZ I was thinking about different art direction scenarios... A bit like with the element.I wanted to create a page with various element following the viewport size as a direction to keep a kind of visual constant.

@fantasai
Copy link
Collaborator

Closing out as a solved question via #6392 (comment) Lmk if this is unsatisfactory. :)

@fantasai fantasai added Closed as Question Answered Used when the issue is more of a question than a problem, and it's been answered. css-sizing-4 labels Jun 22, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Closed as Question Answered Used when the issue is more of a question than a problem, and it's been answered. css-sizing-4
Projects
None yet
Development

No branches or pull requests

5 participants