---
title: "Help choose the syntax for CSS Nesting"
description: "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."
url: "https://swe.quest/articles/help-choose-the-syntax-for-css-nesting-55a28b63e9ccb18f"
canonical: "https://webkit.org/blog/13607/help-choose-from-options-for-css-nesting-syntax/"
source: "WebKit"
published: "2022-12-15"
difficulty: "medium"
kind: "Announcement"
reading_minutes: 8
tags: ["css","language-design","browsers"]
---

# Help choose the syntax for CSS Nesting

A post on [WebKit](https://swe.quest/sources/webkit.md), published 2022-12-15, 8 min read, Announcement. Original: [https://webkit.org/blog/13607/help-choose-from-options-for-css-nesting-syntax/](https://webkit.org/blog/13607/help-choose-from-options-for-css-nesting-syntax/)

## Summary

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. Option 3 lets nested rules sit directly in the declaration block but forbids them from starting with a letter, so element selectors need \`&\` or an \`:is()\` wrapper. Option 4 adds an optional second block after the declarations that holds only nested rules. Option 5 introduces a dedicated \`@nest\` at-rule. Side-by-side examples cover basics, nested nesting, media queries and cascade layers, and developers are asked to vote in a survey.

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)
- [Language design](https://swe.quest/tags/language-design.md) (Compilers & runtimes)
- [Browsers](https://swe.quest/tags/browsers.md) (Web & mobile)

## Prerequisites

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

## Keywords

CSS Nesting, CSS Working Group, Sass, WebKit, Cascade Layers

## 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.
- [CSS Nesting and the Cascade](https://swe.quest/articles/css-nesting-and-the-cascade-5ff99cbe9ee90d16.md): WebKit · 2023-09-28 · Medium · 3 min read · CSS, Browsers
  CSS Nesting now supports relaxed parsing, so nested selectors no longer need to start with a symbol: \`h1 { }\` inside \`article { }\` just works.
- [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.
- [StyleX: A Styling Library for CSS at Scale](https://swe.quest/articles/stylex-a-styling-library-for-css-at-scale-be53ddfe6134c8c8.md): Meta Engineering · 2025-11-11 · Medium · 10 min read · CSS, Frontend, Compilers, Design systems, Web performance
  StyleX is Meta's build-time CSS-in-JS compiler that extracts style objects into collision-free atomic CSS, replacing the earlier cx system and cutting CSS size by 80% across Facebook, Instagram, WhatsApp and others.

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)
