postcss-selector-parser is a CSS selector parser with built-in methods for working with selector strings, and it integrates with PostCSS without requiring it. It is useful for transforming selector text and normalizing selector whitespace, including sync processing and async Promise-based processing.
Project status
- Actively maintained, with the latest recorded activity being updates published in 2025 (v7.1.1 on 2025-11-27) and a recent upstream push on 2026-01-21.
- Update cadence appears moderate, with new versions roughly every several months (v7.0.0 on 2024-10-23, v7.1.0 on 2025-02-07, v7.1.1 on 2025-11-27).
AI summary generated Today
Recent updates
v7.1.1
6 months agov7.1.1 contains a small parsing micro-optimization and a TypeScript typing update. The only runtime code change in the diff is swapping a string startsWith check for direct index-based equality in src/parser.js.
v7.1.0
2/7/2025v7.1.0 adds support for inserting multiple nodes with container.insertBefore and container.insertAfter. The test suite is extended to cover the new multi-node insertion behavior.
BreakingFeaturesv7.0.0
10/23/2024v7.0.0 introduces safer behavior for insertions that occur while iterating a selector container (major change). The code changes focus on how the container updates internal iteration indexes when nodes are inserted via prepend/insertBefore/insertAfter, and the test suite was rewritten to assert the new outcomes.
BreakingFeatures