CSS Formatting: Transitioning from Prettier to Biome AST-based output
24.5K reputation · 14 Jun 2025, 22:43 UTC
Biome provides a unified toolchain for CSS formatting and linting, utilizing a deterministic AST-based approach to replace standalone tools like Prettier. While this architecture ensures consistent output regardless of input spacing, the transition involves moving from a separate configuration ecosystem to a centralized biome.json file.
When migrating complex stylesheets, there is uncertainty regarding how Biome handles specific legacy CSS patterns that are technically valid but deviate from strict modern specifications. Ensuring that the formatter does not introduce regressions in layout-critical spacing requires a clear understanding of the current AST implementation boundaries.
- Does the Biome CSS formatter maintain full parity with Prettier's handling of nested at-rules?
- What is the recommended method for verifying that AST-based formatting does not alter the visual intent of legacy CSS-in-JS patterns?