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 initpostcss-custom-media 128 changes
Breaking changes 4
An error is thrown when a custom media expansion exceeds the maximum size or length.
An error is thrown when @layer nesting exceeds a safe depth.
The commonjs API was removed; supported Node versions can use require(esm) without code changes.
Node.js 20.19.0 or later is now required.
Performance 1
Performance was improved.
Fixes and other changes 3
Handling of cyclic custom media references is deterministic.
Cascade layer names no longer grow exponentially for deeply nested @layer rules.
Fixes the importance of custom media in anonymous cascade layers.
postcss-custom-media 75 changes
Breaking changes 2
Adds support for Node v6 and later.
Adds support for PostCSS v7.
New APIs and options 3
Adds a function to specify where to export custom media.
Adds the importFrom option to specify where to import custom media.
Adds the preserve option to preserve custom media and the at-rules that use them.