lightningcss icon indicating copy to clipboard operation
lightningcss copied to clipboard

Viewport units

Open Ayc0 opened this issue 11 months ago • 2 comments

Shouldn't viewport units like dvh, svh, and lvh be compiled to vh for older browsers? (same for dvw, svw, and lvwvw)

Here we can see that the newer CSS colors are getting updated for older browsers (chrome 90), but not the viewport height – playground

image

Ayc0 avatar Jul 09 '23 11:07 Ayc0

I don't think compiling dvw to just vw would be correct though. It wouldn't adjust correctly based on things like toolbars appearing. You could polyfill it but you'd need JavaScript.

devongovett avatar Jul 09 '23 14:07 devongovett

Even if it's not 100% correct, it could be a good fallback Like for colors out of their color scale (like color(display-p3 0 1 0))

Ayc0 avatar Jul 09 '23 20:07 Ayc0