unstale

npm / postcss-custom-media

postcss-custom-media

What changed in postcss-custom-media 7 to 12, from its official release notes, upgrade guides and advisories. Sources checked 2026-11-13.

6 breaking3 new APIs and options1 performance3 fixes and other

See which of these apply to your code, ranked, in your agent:

npx @unstale/cli init

@unstale/cli 0.3.0 on npm

postcss-custom-media 128 changes

Breaking changes 4

  • An error is thrown when a custom media expansion exceeds the maximum size or length.

    12.0.2release notes

  • An error is thrown when @layer nesting exceeds a safe depth.

    12.0.2release notes

  • The commonjs API was removed; supported Node versions can use require(esm) without code changes.

    12.0.0release notes

  • Node.js 20.19.0 or later is now required.

    12.0.0release notes

Performance 1

Fixes and other changes 3

  • Handling of cyclic custom media references is deterministic.

    12.0.2release notes

  • Cascade layer names no longer grow exponentially for deeply nested @layer rules.

    12.0.2release notes

  • Fixes the importance of custom media in anonymous cascade layers.

    12.0.1release notes

postcss-custom-media 75 changes

Breaking changes 2

New APIs and options 3

  • Adds a function to specify where to export custom media.

    7.0.0release notes

  • Adds the importFrom option to specify where to import custom media.

    7.0.0release notes

  • Adds the preserve option to preserve custom media and the at-rules that use them.

    7.0.0release notes