;
;

CSS-Tricks

A learning community for front-end designers and developers

Let’s Use the Emergent CSS random() Function in all the Browsers

The journey to create a polyfill for the upcoming CSS random() function that works in all browsers. Let’s Use the Emergent CSS random() Function i...
Posted on 31 August 2026 | 3:12 pm

What’s !important #18: <geolocation>, Syntax ::highlight()ing, named-feature(), and More

Well, that’s a wrap. No, not a flex-wrap, but rather today marks a new day, week, month, season, aaaand new edition of What’s important (#18), brin...
Posted on 31 August 2026 | 2:08 pm

Creating Web Widgets Using the Document Picture-in-Picture API

The general idea is that we create a Document Picture-in-Picture window (DPIP window), and then we put HTML, CSS, and JavaScript into it. Creating...
Posted on 27 August 2026 | 2:41 pm

animation-trigger

The CSS animation-trigger property allows you to delay the start of a CSS animation until a specific trigger occurs. animation-trigger originally ...
Posted on 26 August 2026 | 3:38 pm

MicroLighter: Syntax Highlighter

Syntax highlighting for code blocks without the complicated markup, spans, classes, and bloated JavaScript, courtesy of Uncle Dave. MicroLighter: ...
Posted on 25 August 2026 | 2:10 pm

WordPress PHP-Only Block Registration

Seven and half years after blocks arrived in Core, WordPress introduces a way to build blocks without React annd build pipelines. All you need is P...
Posted on 24 August 2026 | 1:54 pm

Resolved: CSS Class Prefix Selector

A newly resolved proposal would allow us to select classes that are a prefix for variations with a wildcard, like .prefix-*. Resolved: CSS Class P...
Posted on 21 August 2026 | 3:13 pm

CSS Navigation Matching, Early Days

Apply a style when someone navigates from one specific page to another. The idea being it'd make the sources for cross-document view transitions de...
Posted on 19 August 2026 | 2:44 pm

WordPress.com Student Plan

As someone who teaches beginning web development, I find that building a WordPress site makes for a great final project. Hosting those projects has...
Posted on 19 August 2026 | 8:50 am

Dark mode toggles: two states are enough

Lea's pushing back on light/dark mode implementations that display three state options for visitors: light, dark, and system. Dark mode toggles: t...
Posted on 17 August 2026 | 2:15 pm

What’s !important #17: Custom Highlight API, CSS Navigation Matching, Fixing text-stroke, and More

Plus, how to style skeleton UIs, how to enable diagonal scrolling, how images can overflow themselves, and yet, still more. Basically, how to do a ...
Posted on 14 August 2026 | 2:01 pm

Blocked aria-hidden: The Warning is Right, and Every Fix You’ve Found is Wrong

The warning is correct. And the recommended fixes you've probably seen are wrong. Here's what you can do instead to properly fix the issue. Blocke...
Posted on 12 August 2026 | 1:43 pm

Animating CSS border-image

Border images are an overlooked feature. One neat fact is that border image slices can run across entire borders on an element, and animating it cr...
Posted on 10 August 2026 | 3:58 pm

SmashingConf Freiburg 2026, September 7-10

Smashing Magazine’s in-person conferences are back and returning to the wonderful city of Freiburg next month, September 7–10. SmashingConf Freibu...
Posted on 10 August 2026 | 3:57 pm

Using and Styling the Dialog Element

There's a lot of nuance to the <dialog> element, a seemingly little piece of web architecture. I've got some notes from digging into it. Usi...
Posted on 7 August 2026 | 2:06 pm