Skip to content

State, Logic, And Native Power: CSS Wrapped 2025

Smashing Magazine

CSS Wrapped 2025 is out! We're entering a world where CSS can increasingly handle logic, state, and complex interactions once reserved for JavaScript. It's no longer just about styling documents, but about crafting dynamic, ergonomic, and robust applications with a native toolkit more powerful than ever. Here's an unpacking of the highlights and how they connect to the broader evolution of modern CSS.

Read more about State, Logic, And Native Power: CSS Wrapped 2025 (Smashing Magazine)

A native way of having more than one thumb on a range slider in HTML

Image

We need to talk about multi-handle range sliders… Really, we do. They’re one of those UI elements we see on a variety of web shops indicating price ranges; we see them for selecting time-slots; we see them for filtering between a variety of lenght units. Creating these experiences is more often inaccessible than just working, and even when I found the so-called perfect library, I’d still run into limitations for styling and expanding upon it. I thought that I should do something about this. I might be way over my head, and that is why I need your help...

Read moreabout A native way of having more than one thumb on a range slider in HTML

Styling siblings with CSS has never been easier. Experimenting with sibling-count and sibling-index

Image

If I were to divide CSS evolutions into categories, then last year was probably the year that ended with animations and colors getting better; This year, the end of the year seems to be about those ease-of-life features. We had one of those not that long go with :has(), but with things such as sibling-count, sibling-index, functions, and conditionals, the way we write CSS might just change for the better once again. In this article, I want to dip my toe in sibling-index() and sibling-count(), while also carefully adding some functions in the mix.

Read moreabout Styling siblings with CSS has never been easier. Experimenting with sibling-count and sibling-index

HTML popovers shown on interest should be accessible on mobile devices

Image

A little while ago, in Chrome 133, a feature called popover=”hint” landed in the browser. This feature paved the way to something bigger, more specifically, popovers being triggered on hover/focus. This comes with a new attribute “interestfor” and some CSS properties to change the delay speed when showing popovers using that method. There still isn’t much definitive on how this should behave on devices without hover capabilities, and that’s what this article is all about. I want to make sure the content of these popovers is accessible on touch devices.

Read moreabout HTML popovers shown on interest should be accessible on mobile devices

The customizable select - Part five: Optgroup, creating a true select menu

Image

In this part of my customizable select series, I want to highlight option groups! Option groups are part of our select interactions to provide clarity, and now, they can be styled. This will certainly not be the last demo I did on the select, and more updates are coming to this element. With a wink to the past, we will be creating a restaurant dish picker, a true “Select Menu”.

Read moreabout The customizable select - Part five: Optgroup, creating a true select menu

The customizable select - Part four: Scroll snapping, state queries, monster hunter, and gamification

Image

In this (long) part of the customizable select series, it’s all about gamification. In this article, I’d like to highlight one of my demos, where I aimed to recreate a piece of UI found in the Monster Hunter games. To re-create this behavior, I had to think in terms of keyboard navigation first. This demo requires quite a lot of CSS, as well as some scripting, and in the end, I do want to highlight some accessibility concerns. This is an experiment on how far we can take it when styling select elements.

Read moreabout The customizable select - Part four: Scroll snapping, state queries, monster hunter, and gamification