---
title: "Try out CSS Nesting today"
description: "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."
url: "https://swe.quest/articles/try-out-css-nesting-today-89a2bd161645dd60"
canonical: "https://webkit.org/blog/13813/try-css-nesting-today-in-safari-technology-preview/"
source: "WebKit"
published: "2023-02-08"
difficulty: "medium"
kind: "How-to"
reading_minutes: 5
tags: ["css","browsers"]
---

# Try out CSS Nesting today

A post on [WebKit](https://swe.quest/sources/webkit.md), published 2023-02-08, 5 min read, How-to. Original: [https://webkit.org/blog/13813/try-css-nesting-today-in-safari-technology-preview/](https://webkit.org/blog/13813/try-css-nesting-today-in-safari-technology-preview/)

## Summary

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. It works much like Sass nesting, but in this version a nested selector must begin with a symbol: a bare element selector like \`article\` is silently ignored, which you avoid by prefixing \`&\` or wrapping it in \`:is()\`. The \`&\` also places the parent selector explicitly, as in \`.component &\` or \`&:hover\` without a descendant space. A later note says Safari Technology Preview 179+ dropped the symbol requirement.

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))
- Sass nesting

## Keywords

CSS Nesting, Safari Technology Preview, Sass, Chrome, WebKit, :is()

## Related posts

- [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.
- [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.
- [Using :has() as a CSS Parent Selector and much more](https://swe.quest/articles/using-has-as-a-css-parent-selector-and-much-more-a6801a96d8b4f383.md): WebKit · 2022-08-18 · Medium · 13 min read · CSS, Frontend, Browsers
  The CSS \`:has()\` pseudo-class, long requested as a "parent selector", lets developers style an element based on its descendants, its following siblings, or the state of elements anywhere in the DOM.
- [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.

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)
