Links

Faux Containers in CSS Grids
CSS Grid helps a lot, but I still see developers getting a bit tangled in complex, nested grids and subgrids, trying their best to stretch inner containers around the breakout elements while respecting the content therein. The advice I give to those overwhelmed by this task: Decouple the containing shape from its content! Make a faux container, and put that where you want it to go.
Reimagining Fluid Typography
For many years, it has been ‘best practice’ to use relative units (especially
em
andrem
) for sizing text. That’s great! But after playing around with my user preferences, I think we can improve on the common approaches.
Organizing Design System Component Patterns With CSS Cascade Layers
I enjoy organizing code and find cascade layers a fantastic way to organize code explicitly as the cascade looks at it. The neat part is, that as much as it helps with "top-level" organization, cascade layers can be nested, which allows us to author more precise styles based on the cascade and inheritance.
Replace JS animations with View Transitions
Use the View Transitions API to create smooth animations between DOM states with minimal CSS and JavaScript, replacing heavy animation libraries.
Style-observer: JS to observe CSS property changes, for reals
I cannot count the number of times in my career I wished I could run JS in response to CSS property changes, regardless of what triggered them: media queries, user actions, or even other JS.
Videos

Fixing when CSS Grid has extra spacing
Ever use grid, only for your rows to be way too tall, and you can't figure out why? It's happened to all of us, but luckily it's easy to fix!
Sponsor
Sponsored by Cloud Four
Thanks to Cloud Four for sponsoring this week’s newsletter! They solve complex responsive web design and development challenges for ecommerce, healthcare, fashion, B2B, SaaS, and nonprofit organizations.
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.