Menu

📰
0

What’s !important #4: Videos & View Transitions, Named Media Queries, How Browsers Work, and More

CSS-Tricks·@DanielSchwarz·2 months ago
#dUh8zp
Reading 0:00
15s threshold

Neither Chrome, Safari, nor Firefox have shipped new features in the last couple of weeks, but fear not because leading this issue of What’s !important is some of the web development industry’s best educators with, frankly, some *killer* content. ### Maintaining video state across different pages using view transitions Chris Coyier demonstrates how to maintain a video’s state across different pages using CSS view transitions. He notes that this is fairly easy to do with same-page view transitions, but with multi-page view transitions you’ll need to leverage JavaScript’s pageswap event to save information about the video’s state in sessionStorage as a JSON string (works with audio and iframes too), and then use that information to restore the state on pagereveal. Yes, there’s a *tiiiiny* bit of audio stutter because we’re technically faking it, but it’s still super neat.…

Continue reading — create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.

Read More