The best new CSS features for 2023

By Akash
on 05-09-2023 12:04 PM

Cascading Style Sheets (CSS) first dropped in 1996, and it remains an essential, evolving part of the web development stack. Like other living languages, CSS is constantly introducing new features in response to real-world practices. This quick evolution can make it easy for even dedicated developers to miss new features. Here’s a look at the most useful new and upcoming features in CSS this year.
Table of Contents

Cascade layers
The inert attribute
The :has pseudo-class
Grid layout and subgrid
The accent-color option

Show More
Cascade layers

Cascade layers is an elaboration of how CSS specificity and inheritance work. It’s a bit abstract to understand, but also fundamental to CSS. A layer is a kind of logical space that is interjected into the algorithm a CSS engine uses to determine what styles apply to elements based on cascading, specificity, and inheritance.

The core use case for layers is making it easier to combine multiple style sources into a single project. Multiple CSS source libraries can be combined as named themes that don’t conflict internally, making it easier for different teams to collaborate on large and diverse CSS codebases.