Links
Container Queries Land in Stable Browsers
With container queries you can query the styling information of a parent element, such as its inline-size. With media queries, you could query the size of the viewport, container queries enable components that can change based on where they are in the UI. Container queries are especially handy for responsive design and reusable components. For example, enabling a card component that can lay out in one way when placed in a sidebar, and in a different configuration within a product grid.
The Case for Frameworks
In the meantime, my fellow developers, don't feel stupid. You have not had the wool pulled over your eyes by a cabal of fast talkers. You've been making sensible decisions in the best interests of yourself and your users in the aggregate, and you don't need to feel like you're a bad person for using the popular frameworks. They are popular because they are a damn good idea.
This is Why Performance Matters
I just had a power cut and wanted to check how long it would be out for. The UK Power Networks power outage tool is handy for that, but there’s a problem: I only had a 3G network connection and the site is heavily dependent on JavaScript. Can you guess what happened? Yep: I couldn’t access the content I really needed to get access to.
The (Extremely) Loud Minority
Always remember that although a subset of the JavaScript community can be very loud, they represent a paltry portion of the web as a whole. This means that when they say something like “Best practices don’t actually work”—what they mean is “Best practices don’t actually work for a small subset of less than 5 percent of the web”.
What to Expect From Your Framework
I’ve had a good long sad about the distressingly low bar we’ve set for something to bill itself as a Framework. I suppose this is partly because we’ve never really agreed about what constitutes one, and (spoiler alert) I don’t have a proper working definition either. But let’s get this out of the way first: React is not a framework.
Videos
3 New & Nifty CSS Things: :has, Container Queries, and Animated CSS Grid
Here's some cool new stuff to CSS! I put it all into a little demo because I was curious about how it all works. We've got animating CSS grid we've got the
has()
selector and we've got container queries all in one to make this kind of nifty UI.
Sponsor
Sponsored by Cloud Four
Thanks to Cloud Four for sponsoring this week’s newsletter! If you’d like to help with the costs of running Friday Front-End, you can back our Patreon for as little as a dollar a month.