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

sizes based on viewport-height unit #1280

Open
tennox opened this issue Mar 7, 2024 · 0 comments
Open

sizes based on viewport-height unit #1280

tennox opened this issue Mar 7, 2024 · 0 comments

Comments

@tennox
Copy link

tennox commented Mar 7, 2024

I have a use-case which I think is not currently possible:
A hero image with object-fit: cover that has full width a height of 88vh - so on portrait-orientation screens, using the width as indicator leads to a pixelated image.

I've tried different variations of sizes values, but setting a vh unit does not work:

<NuxtPicture class="block h-full w-full" :img-attrs="{ 'class': 'w-full h-full object-cover object-center-top' }"
    sizes="88vh lg:100vw" />

Might be enabled by #469 if I can set a custom value 🤔

Or is there a different way to achieve my goal?

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