# Extension points — postcss/postcss

> Canonical page: https://codevetter.com/unpack/postcss/extension-points

# Extension points — postcss/postcss

Scanned commit 7ac902664902289ea0cb9d6b1096b81e8d33bbf5 (2026-09-29). Generated by codevetter codevetter 1.15.0 on 2026-10-02.

Source inspection; upstream code and tests were not executed.

The primary extension boundary is the plugin interface, with creators, packs, per-result preparation, filtered visitors, and lifecycle hooks. Parser and stringifier options provide a separate syntax boundary. AST factories and mutation methods allow extensions to construct or move nodes while retaining source information. Messages connect plugins to runners, while internal registration functions wire modules together and should be distinguished from public plugin APIs.
- Processor.normalize accepts creators marked postcss=true, postcss wrappers, objects containing plugins arrays, named plugin objects, and legacy functions; Processor.use exposes incremental registration. — [lib/processor.js#L14-41](https://github.com/postcss/postcss/blob/7ac902664902289ea0cb9d6b1096b81e8d33bbf5/lib/processor.js#L14-L41) [lib/processor.js#L57-59](https://github.com/postcss/postcss/blob/7ac902664902289ea0cb9d6b1096b81e8d33bbf5/lib/processor.js#L57-L59) [lib/postcss.d.ts#L195-227](https://github.com/postcss/postcss/blob/7ac902664902289ea0cb9d6b1096b81e8d33bbf5/lib/postcss.d.ts#L195-L227)
- Plugin.prepare(result) can create per-processing state and return runtime listeners that are merged over the original plugin; Helpers supplies result, postcss, and the public API. — [lib/lazy-result.js#L183-191](https://github.com/postcss/postcss/blob/7ac902664902289ea0cb9d6b1096b81e8d33bbf5/lib/lazy-result.js#L183-L191) [lib/postcss.d.ts#L193-198](https://github.com/postcss/postcss/blob/7ac902664902289ea0cb9d6b1096b81e8d33bbf5/lib/postcss.d.ts#L193-L198) [test/visitor.test.ts#L766-788](https://github.com/postcss/postcss/blob/7ac902664902289ea0cb9d6b1096b81e8d33bbf5/test/visitor.test.ts#L766-L788)
- PLUGIN_PROPS defines recognized lifecycle events; prepareVisitors builds listener arrays in plugin order, expands '*' handlers, lowercases named filters, and rejects unknown capitalized event names. — [lib/lazy-result.js#L22-45](https://github.com/postcss/postcss/blob/7ac902664902289ea0cb9d6b1096b81e8d33bbf5/lib/lazy-result.js#L22-L45) [lib/lazy-result.js#L254-289](https://github.com/postcss/postcss/blob/7ac902664902289ea0cb9d6b1096b81e8d33bbf5/lib/lazy-result.js#L254-L289)
- Declaration and AtRule visitor filters use lowercased property/name keys; getEvents schedules general enter, filtered enter, children where applicable, general exit, and filtered exit. — [lib/lazy-result.js#L53-76](https://github.com/postcss/postcss/blob/7ac902664902289ea0cb9d6b1096b81e8d33bbf5/lib/lazy-result.js#L53-L76) [lib/postcss.d.ts#L52-97](https://github.com/postcss/postcss/blob/7ac902664902289ea0cb9d6b1096b81e8d33bbf5/lib/postcss.d.ts#L52-L97)
- Custom parsing resolves syntax.parse first and then an explicit parser override; custom serialization resolves syntax.stringify first and then an explicit stringifier override, accepting function or method-bearing forms. — [lib/lazy-result.js#L164-171](https://github.com/postcss/postcss/blob/7ac902664902289ea0cb9d6b1096b81e8d33bbf5/lib/lazy-result.js#L164-L171) [lib/lazy-result.js#L381-385](https://github.com/postcss/postcss/blob/7ac902664902289ea0cb9d6b1096b81e8d33bbf5/lib/lazy-result.js#L381-L385) [lib/postcss.d.ts#L229-259](https://github.com/postcss/postcss/blob/7ac902664902289ea0cb9d6b1096b81e8d33bbf5/lib/postcss.d.ts#L229-L259)
- Stringifier subclasses can override traversal methods; body only uses its built-in stack expansion when atrule, block, body, rule, and stringify retain their base implementations, preserving subclass dispatch otherwise. — [lib/stringifier.js#L166-198](https://github.com/postcss/postcss/blob/7ac902664902289ea0cb9d6b1096b81e8d33bbf5/lib/stringifier.js#L166-L198) [docs/syntax.md#L197-226](https://github.com/postcss/postcss/blob/7ac902664902289ea0cb9d6b1096b81e8d33bbf5/docs/syntax.md#L197-L226)
- Plugins can append dependency and dir-dependency messages, including optional directory globs; runner guidelines assign watching and rebuild behavior to consumers of result.messages. — [docs/guidelines/plugin.md#L228-254](https://github.com/postcss/postcss/blob/7ac902664902289ea0cb9d6b1096b81e8d33bbf5/docs/guidelines/plugin.md#L228-L254) [docs/guidelines/runner.md#L90-112](https://github.com/postcss/postcss/blob/7ac902664902289ea0cb9d6b1096b81e8d33bbf5/docs/guidelines/runner.md#L90-L112) [lib/result.js#L10-16](https://github.com/postcss/postcss/blob/7ac902664902289ea0cb9d6b1096b81e8d33bbf5/lib/result.js#L10-L16)
- Internal registerParse/registerRule/registerAtRule/registerRoot and Root/Document processor registrations resolve module dependencies; Parser.precheckMissedSemicolon is separately marked as a Safe Parser hook. — [lib/container.js#L451-465](https://github.com/postcss/postcss/blob/7ac902664902289ea0cb9d6b1096b81e8d33bbf5/lib/container.js#L451-L465) [lib/processor.js#L66-67](https://github.com/postcss/postcss/blob/7ac902664902289ea0cb9d6b1096b81e8d33bbf5/lib/processor.js#L66-L67) [lib/lazy-result.js#L618-626](https://github.com/postcss/postcss/blob/7ac902664902289ea0cb9d6b1096b81e8d33bbf5/lib/lazy-result.js#L618-L626) [lib/parser.js#L489-491](https://github.com/postcss/postcss/blob/7ac902664902289ea0cb9d6b1096b81e8d33bbf5/lib/parser.js#L489-L491)

Every claim links to its cited files at the pinned commit. Citations identify source evidence; they do not establish runtime correctness. Independent CodeVetter scan — not reviewed by upstream maintainers.

## Public product links

- [CodeVetter](https://codevetter.com/)
- [Download](https://codevetter.com/download)
- [Documentation](https://codevetter.com/docs/)
- [Source](https://github.com/Codevetter/codevetter)
