Skip to content

Use viewport units for both width and height #18142

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

Closed
wants to merge 1 commit into from

Conversation

evrial
Copy link

@evrial evrial commented May 25, 2025

img and video should not exceed viewport size.

@evrial evrial requested a review from a team as a code owner May 25, 2025 12:23
@philipp-spiess
Copy link
Member

Hey! Thanks for the suggestion but this seems like an app-specific concern that we better not change in preflight (let alone the fact that this would require a major change since it probably breaks a lot of images). Feel free to do this in your own CSS if you need it:

@layer base {
  img {
    max-width: 100vw;
    max-height: 100vh;
  }
}

@evrial
Copy link
Author

evrial commented May 26, 2025

Ok, yes you're right, thanks for feedback.

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

Successfully merging this pull request may close these issues.

2 participants