feat: format css
A port of bun's port of Prettier's CSS printer and the four parsers it uses, as tidyrs::css with Css, Scss and Less dialects. Statements are written straight to the output when every group on a line fits flat, as bun does. One that doesn't goes through a small builder into the shared doc IR, which print_at prints in place. Markup now formats <style> and style="" with it unless the embed hook answers first, and embeds the CSS document rather than its text. format_embedded is Prettier's embeddedLanguageFormatting: off, neither the hook nor the built-in formatters run. All formatters keep a byte order mark, as Prettier does. Conformance: CSS 158/160, SCSS 135/136, Less 236/238. The misses are bun's corrections of custom property values, and the same embedded in markup matches Prettier fixture for fixture.
Parent5d439d7
31 files changed+9509-91
StackedSplit