CSS Refraction, Scroll-State Queries, and a Two-Week Browser Cycle

Featured image

CSS-Tricks returns with a dense roundup of pure-CSS refraction effects, scroll-state container queries, anchor-positioned grid animations, and rapid browser releases that push alpha(), progress(), and customizable selects to Baseline. CSS-Tricks is back with a stacked roundup, and the newsletter returns Nov. 10. These roundups move to the inbox every two weeks. Subscribe if you want … Read more

HTML, CSS, and you: 5 YouTube channels to learn hands-on web development

image

Starting your journey in web development can feel like learning a new language—except, instead of having conversations, you are creating websites. If you’ve been thinking of building beautiful websites, all you need is a bit of HTML and CSS. And, of course, the right instructions to guide you along the way. Here are some YouTube … Read more

Dark Mode CSS Variables: Theme Systems with light-dark()

image

How to Build a No-Flash CSS Dark Mode Toggle Declare color-scheme: light dark on :root and add a <meta name=”color-scheme”> tag in <head>. Define design tokens as CSS custom properties using light-dark() for each color value. Wrap light-dark() tokens in an @supports block and provide a prefers-color-scheme media-query fallback outside it. Add a blocking inline … Read more

Flexbox space-between Not Working on Wide Screens: How to Fix It

image

A three-card layout looks great at tablet width—until someone opens the same page on a 1440 px ultrawide monitor, and the cards stretch wall to wall with zero visible spacing. The root cause lies in how the Flexbox algorithm prioritizes flex-grow over justify-content. Table of Contents The Wide-Screen Spacing Mystery A three-card layout looks great … Read more

React Dialog Exit Animation: Fixing Transitions on Unmount

image

Exit animations on React dialogs are a commonly reported source of confusion in frontend development. The core issue is deceptively simple: React’s conditional rendering model removes DOM nodes synchronously, which means CSS transitions and JavaScript animations targeting the exit state never get a chance to run. This guide evaluates five distinct approaches to solving the … Read more