Post

Getting the viewport size in CSS ain't a new trick, but storing it as a variable and using it to position elements on the page opens up a lot of new tricks. Here's @monknow.bsky.social using it to fluidly position elements on a page without overlapping. css-tricks.com/typecasting-...

css-tricks.comTypecasting And Viewport Transitions In CSS With Tan(atan2()) | CSS-TricksWe've been able to get the length of the viewport in CSS since... checks notes... 2013! Surprisingly, that was more than a decade ago. Getting the

3 reposts18 likes

calc(100vw / 1px) Works in Safari. They refused to put it on Interop 2025. So blame Chrome/Firefox for being forced to jump through hoops.