Changelog
All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.
[1.0.0] - 2026-06-09
Initial release.
Added
swatch.to_tokensfor tokenizing CSS source into a list of classified tokens that round-trip back to the original input.swatch.to_sourceandswatch.token_to_sourcefor reassembling a token list (or a single token) back into source — the inverse ofto_tokens.swatch.to_htmlfor rendering CSS as HTML withhl--prefixed CSS classes per token kind. Theclassattribute is quoted (<span class="hl-…">).swatch.to_ansifor rendering CSS to the terminal using ANSI color escapes.swatch.tokens_to_htmlandswatch.tokens_to_ansi, which take a pre-tokenized list so callers that also need the tokens can render without tokenizing twice.swatch.Tokentype covering selectors (element, class, id, pseudo, attribute), at-rules, properties, custom properties, strings, numbers and units, hex colors, functions, keywords,!important, operators, punctuation, comments, whitespace, and a fallback for unmatched input.