# postcss/postcss-nested

PostCSS plugin to unwrap nested rules like how Sass does it.

Repository: https://github.com/postcss/postcss-nested
Canonical: https://ross.abutalabs.com/products/postcss-nested
Language: JavaScript
License: MIT
License Family: permissive
Last push: 2026-08-02T10:23:17+00:00

## Health v2 (maintenance only)
Score: 96/100 (v2, computed 2026-09-03T02:20:16.233290+00:00)
- activity 95, release rhythm 96, longevity 100
- inputs: {"age_days": 4317, "days_push": 31, "days_rel": 31, "gap_med": 2.0, "n_releases_24m": 5}
- flags: none
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 1200, forks 64 (observed 2026-08-28T04:03:58.055777+00:00)

## What it is
A PostCSS plugin that unwraps nested CSS rules using Sass-like syntax, flattening them into standard flat CSS. It supports bubbling of at-rules like @media and @supports, as well as parent selector references and @at-root.

## Use cases
- write nested CSS with Sass-like syntax and compile to plain CSS
- unwrap nested rules in a PostCSS build pipeline
- use CSS nesting without relying on native browser support
- bubble media queries and other at-rules out of nested selectors
- reference parent selectors with & in nested styles

## When to choose
- you already use PostCSS and want Sass-style nesting
- you want nesting closer to the Sass syntax rather than the CSSWG draft
- you need configurable at-rule bubbling in nested CSS

## When to avoid
- you want the official CSS nesting spec implementation (use postcss-nesting instead)
- your build pipeline does not use PostCSS
- you need a full CSS preprocessor with variables, mixins, and functions

## Facets
- artifact type: plugin
- maturity: stable
- function: css-framework, build-tool
- domain: web-development, frontend
- platform: cross-platform
- tags: postcss-plugin, css-nesting, sass-syntax, css-processing, nodejs

## Member repositories
- postcss/postcss-nested (main) score 96

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:03:58.055777+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-30T06:20:50.816213+00:00, confidence not recorded.
  - readme: https://github.com/postcss/postcss-nested (fetched 2026-08-28T04:03:58.055777+00:00, sha 5a2ec12ad6d8)
  - registry_npm: https://registry.npmjs.org/postcss-nested (fetched 2026-08-29T12:28:13.423210+00:00, sha 5a01f1f269ee)
- Data as of 2026-08-30T08:39:29.467469+00:00.
