New Viewport Units
ishadeed.com New Viewport Units |
AI summary of the linked articleThe article explains that CSS vh units can misbehave on mobile browsers whose address bar UI shrinks on scroll, because 100vh does not account for that UI and can leave content hidden or off-center. It introduces the small (svh), large (lvh), and dynamic (dvh) viewport units, which the CSS working group agreed on to address this. Examples include a modal with a sticky footer that becomes partly invisible with 100vh, and a hero section where svh with a header height calc avoids cropping. The author advises caution with dvh for font sizes and notes possible performance costs of recalculating styles while scrolling. |
Comments No comments yetWhat caught your eye? Start the discussion. |
More from ishadeed.com on Kiwi News |
