CSS-Trickz! also ready to join Digital Ocean

You probably want CSS-Tricks

Crafting Strong DX With Astro Components and TypeScript

Written by: Bryan Robinson

One thing we can do to help teams code consistently is provide type-checking so that all of the configurable options for a specific component are available while coding. Bryan demonstrates how he does this with TypeScript when working with Astro components.

Continue reading "Crafting Strong DX With Astro Components and TypeScript" at CSS-Tricks

Worlds Collide: Keyframe Collision Detection Using Style Queries

Written by: Lee Meyer

Interactive CSS animations with elements ricocheting off each other seem more plausible in 2025. While it’s unnecessary to implement Pong in CSS, the increasing flexibility and power of CSS reinforce Lee’s suspicion that one day it will be a lifestyle choice whether to achieve any given effect with scripting or CSS.

Continue reading "Worlds Collide: Keyframe Collision Detection Using Style Queries" at CSS-Tricks

Quick Hit #42

Written by: Geoff Graham

Masonry in CSS: There’s a new, third option in the debate that combines Flexbox and CSS Grid features into a […]

Continue reading "Quick Hit #42" at CSS-Tricks

Automated Visual Regression Testing With Playwright

Written by: Frederik Dohr

With visual regression testing, we can update a page, take screenshots before and after the fact, and compare the results for unintended changes. In this article, learn how to set up visual regression testing using Playwright.

Continue reading "Automated Visual Regression Testing With Playwright" at CSS-Tricks

Case Study: Combining Cutting-Edge CSS Features Into a “Course Navigation” Component

Written by: Daniel Schwarz

Having been tasked with creating a UI component for navigating the content of an online course, Daniel found himself neck-deep in a pool of new CSS features that he wound up using on the project.

Continue reading "Case Study: Combining Cutting-Edge CSS Features Into a “Course Navigation” Component" at CSS-Tricks

Support Logical Shorthands in CSS

Written by: Geoff Graham

There’s a bit of a blind spot when working with CSS logical properties concerning shorthands.

Continue reading "Support Logical Shorthands in CSS" at CSS-Tricks

Revisiting CSS border-image

Written by: Andy Clarke

I’ve used border-image regularly. Yet, it remains one of the most underused CSS tools, and I can’t, for the life of me, figure out why. Is it possible that people steer clear of border-image because its syntax is awkward and unintuitive? Perhaps it’s because most explanations don’t solve the type of creative implementation problems that most people need to solve. Most likely, it’s both.

Continue reading "Revisiting CSS border-image" at CSS-Tricks

Quick Reminder That :is() and :where() Are Basically the Same With One Key Difference

Written by: Geoff Graham

I’ve seen a handful of recent posts talking about the utility of the :is() relational pseudo-selector. No need to delve […]

Continue reading "Quick Reminder That :is() and :where() Are Basically the Same With One Key Difference" at CSS-Tricks

Quick Hit #41

Written by: Geoff Graham

Ooo, look at that: Safari Technology Preview 215 adds support for scroll-driven animations, anchor positioning, and text-wrap: pretty. That’s a […]

Continue reading "Quick Hit #41" at CSS-Tricks

Quick Hit #40

Written by: Geoff Graham

Smashing Magazine is hosting a free online event discussing modern CSS goodness with the likes of Adam Argyle, Julia Miocene, […]

Continue reading "Quick Hit #40" at CSS-Tricks

Styling Counters in CSS

Written by: Juan Diego Rodríguez

Going from the most basic ways to style lists directly in HTML to advanced customization techniques that are even capable of making things that aren’t lists look like lists.

Continue reading "Styling Counters in CSS" at CSS-Tricks

Quick Hit #39

Written by: Geoff Graham

The CSSWG has voted to add a size keyword that’s shorthand for the width and height properties.

Continue reading "Quick Hit #39" at CSS-Tricks