Urgent.News

What's breaking now, across thousands of outlets.

Tech

The State of CSS in 2026: What Actually Changed

The State of CSS in 2026: What Actually Changed CSS went through a period where every browser shipped different experimental features. That era is effectively over. The features that stuck changed how we write stylesheets — and the ones that didn't taught useful lessons. What shipped and actually matters Nesting (native) .card { background : white ; } .card h2 { margin : 0 ; } became: .card {…

In 2026, the state of CSS has undergone significant changes that have transformed the way developers write stylesheets. Prior to this period, each browser shipped with different experimental features, creating inconsistency and complexity in web development. However, these issues have now largely been resolved.

One of the most impactful changes is the introduction of native nesting in CSS. This allows developers to write styles such as:

.card {

background: white;

}

.card h2 {

margin: 0;

}

This eliminates the need for pre-processors like Sass and simplifies the syntax, as there is no longer a build step required. Additionally, native nesting preserves the normal functioning of the cascade.

Another major development is the implementation of container queries. Instead of using media queries to adjust layouts based on viewport size, developers can now write:

if the container is narrow, change the layout.

This addresses a real architectural problem that media queries never fully resolved. Similarly, the introduction of :has() selector marks a long-awaited addition to CSS. With :has(.empty) { }, developers can style a container only when it contains an empty element, making the code simpler and more intuitive.

Cascade layers, introduced via the @layer rule, offer explicit control over specificity without the need for !important conflicts. Developers can define layers, import third-party styles into a low-priority layer, and ensure that their component styles take precedence predictably.

While some features, such as anchor positioning and the view transitions API, are technically impressive, they have not gained widespread adoption for real UI applications. The @scope rule shows promise, but existing class scoping solutions often suffice for most real-world needs.

The shift in tooling has also played a crucial role in shaping the modern CSS landscape. Design-system ecosystems have converged on a pattern that includes component-level styles with container queries, layer-organized third-party imports, :has() for conditional styling, and native nesting for organization. Consequently, most utility-first frameworks have adopted these patterns, and teams have largely stopped fighting the cascade.

For developers whose CSS may feel outdated, there are several actions they can take. First, replace Sass nesting with native CSS nesting for a more streamlined approach. Second, convert traditional viewport breakpoints to container queries whenever components are reused at different sizes. Third, utilize @layer to manage conflicts arising from third-party stylesheets.

Finally, replace JavaScript-based parent/child detection with the :has() selector. With CSS now reaching a mature state, the resulting code is shorter, clearer, and more portable compared to five years ago.

Written by urgent.news from Dev.to's reporting — not their text. Machine-written — may contain errors; check the original before relying on it.

Read the original at dev.to →

More in Tech

What Happens When You Type a URL: Answer It With Three Interactive Simulators

"What happens when you type a URL and press enter?" is the most reused interview question in infrastructure, and for good reason: the honest answer touches DNS, TCP, TLS, CDNs, load balancers and…

  • DNS Simulator illustrates DNS resolution process with caches and resolver queries
  • TCP vs UDP Simulator explains handshake-based TCP vs UDP connectionless protocol
  • Packet Journey Simulator visualizes full path from DNS to web server response

Practical Magic 2 Review

Sandra Bullock, Nicole Kidman and the rest of the Practical Magic 2 cast toil and trouble to conjure up a worthwhile sequel, but they’re cursed with a very messy script.

7 Ways to Make Your API Faster

Hello, I'm Maneshwar, and I'm building LiveReview — a blast-radius aware AI code review built for your business-critical systems.

  • Measure and confirm actual slow points before optimizations
  • Implement caching with Redis or Memcached to eliminate expensive queries
  • Use connection pooling to avoid overhead of opening/closing connections

How I Built a Chrome Extension to Improve Reading on Medium

I read a lot of articles on Medium. Mostly technical stuff, product stories, startup ideas, and random things I find while browsing.

  • Author built Chrome extension to improve Medium reading experience
  • Addresses paywall access, Dark Mode, and article saving issues
  • Extension merges multiple solutions into one cohesive tool

More from Tuesday 8 September →