This directory contains all the Rust crates that make up the csskit project. Each crate serves a specific purpose in the CSS parsing, AST generation, and tooling ecosystem. The modular architecture allows for flexible usage - components can be used independently or as part of the complete csskit toolchain.
The crates follow a layered architecture:
- Lexing Layer:
css_lexer- Tokenization of CSS source - Parsing Layer:
css_parse- Grammar-based parsing into ASTs - AST Layer:
css_ast- Type-safe representation of CSS constructs - Tool Layer: Various specialized tools and integrations
- Application Layer:
csskit- CLI and high-level APIs
csskit- Main CLI application and entry point (docs)css_lexer- CSS/CSS-alike tokenizer/lexer for breaking CSS into tokens (docs)css_parse- CSS/CSS-alike parser that builds on the lexer to create parse trees (docs)css_ast- Abstract Syntax Tree definitions for the CSS language (docs)
csskit_lsp- Language Server Protocol implementation for csskit (docs)csskit_highlight- Syntax highlighting utilities (docs)csskit_transform- CSS transformation and optimization utilities (docs)csskit_wasm- WebAssembly bindings for browser/Node/Deno (docs)chromashift- Color format conversion library (docs)css_feature_data- CSS feature compatibility and browser support data, utilising "Web-Features" (docs)
csskit_source_finder- Tools to search the csskit source for codegen (docs)csskit_derives- Derive macros for CSS-related types (docs)csskit_proc_macro- Procedural macros for code generation (docs)