---
title: "CSS Nesting and the Cascade"
description: "CSS Nesting now supports relaxed parsing, so nested selectors no longer need to start with a symbol: `h1 { }` inside `article { }` just works."
url: "https://swe.quest/articles/css-nesting-and-the-cascade-5ff99cbe9ee90d16"
canonical: "https://webkit.org/blog/14571/css-nesting-and-the-cascade/"
source: "WebKit"
published: "2023-09-28"
difficulty: "medium"
kind: "Opinion"
reading_minutes: 3
tags: ["css","browsers"]
---

# CSS Nesting and the Cascade

A post on [WebKit](https://swe.quest/sources/webkit.md), published 2023-09-28, 3 min read, Opinion. Original: [https://webkit.org/blog/14571/css-nesting-and-the-cascade/](https://webkit.org/blog/14571/css-nesting-and-the-cascade/)

## Summary

CSS Nesting now supports relaxed parsing, so nested selectors no longer need to start with a symbol: \`h1 { }\` inside \`article { }\` just works. Firefox 117 and Safari Technology Preview 179 ship it, and Chrome's update is in progress. The \`&\` still marks where the parent selector goes, as in \`article &\`. An open question remains about declarations that follow a nested \`@supports\` block. The current spec, matching Sass, Less and other preprocessors, hoists them so the earlier rule wins, while a developer survey favored preserving source order (62% vs 38%).

Written by swe.quest, not by the author.

**Difficulty:** Medium: assumes a working developer; shows how it is built or done

## Topics

- [CSS](https://swe.quest/tags/css.md) (Web & mobile)
- [Browsers](https://swe.quest/tags/browsers.md) (Web & mobile)

## Prerequisites

- CSS selectors ([easy posts on CSS](https://swe.quest/tags/css.md?difficulty=easy))
- CSS cascade and specificity ([easy posts on CSS](https://swe.quest/tags/css.md?difficulty=easy))

## Keywords

CSS Nesting, Safari Technology Preview, Firefox 117, Sass, CSS Working Group, @supports

## Related posts

- [Try out CSS Nesting today](https://swe.quest/articles/try-out-css-nesting-today-89a2bd161645dd60.md): WebKit · 2023-02-08 · Medium · 5 min read · CSS, Browsers
  CSS Nesting, using the community-chosen Option 3 syntax, shipped on by default in Safari Technology Preview 162 and is behind a flag in Chrome Dev.
- [Help choose the syntax for CSS Nesting](https://swe.quest/articles/help-choose-the-syntax-for-css-nesting-55a28b63e9ccb18f.md): WebKit · 2022-12-15 · Medium · 8 min read · CSS, Language design, Browsers
  The CSS Working Group is choosing between three candidate syntaxes for native CSS nesting, since Sass-style nesting is impossible: browser parsers would read a nested selector like \`element:pseudo\` as a \`property: value\` declaration.
- [WebKit Features in Safari 16.5](https://swe.quest/articles/webkit-features-in-safari-16-5-78f214007552b969.md): WebKit · 2023-05-18 · Easy · 4 min read · Browsers, CSS, Frontend
  Safari 16.5 is mainly a polish and bug-fix release that adds CSS Nesting, the :user-valid and :user-invalid pseudo-classes, Apple Pay support for pre-orders and deferred payments, and disabling of the WebCodecs API in Lockdown Mode.
- [Release Notes for Safari Technology Preview 243](https://swe.quest/articles/release-notes-for-safari-technology-preview-243-b654215c3d2767b1.md): WebKit · 2026-05-07 · Medium · 18 min read · Browsers, CSS, Accessibility, JavaScript
  Safari Technology Preview 243 ships WebKit changes 310600@main through 312007@main for macOS Tahoe and Sequoia.
- [WebKit Features in Safari 17.2](https://swe.quest/articles/webkit-features-in-safari-17-2-c596929bac2922c9.md): WebKit · 2023-12-11 · Medium · 27 min read · Browsers, CSS, Frontend, JavaScript
  Safari 17.2 ships 39 web platform features and 169 fixes, its largest December release.

Browse: [Latest posts](https://swe.quest/index.md) · [Topics](https://swe.quest/tags.md) · [Sources](https://swe.quest/sources.md) · [Topic map](https://swe.quest/map.md) · [Site guide (llms.txt)](https://swe.quest/llms.txt)
