Expand description
MusKitty CSS (umbrella)
Re-exports the tokenizer (muskitty-css-tokenizer) and parser
(muskitty-css-parser) crates. Downstream crates can either depend
on this umbrella for the full CSS Syntax stack, or on the individual
sub-crates for finer-grained dependencies.
§Architecture
- Tokenization (
tokenizer) — re-exported frommuskitty-css-tokenizer(§4.3, fully implemented). - Parsing (
parser) — re-exported frommuskitty-css-parser(§5, fully implemented).
§Top-level API
parse_stylesheet— full stylesheet parse (§5.4.3)parse_rule— single rule parse (§5.4.6)parse_declaration— single declaration parse (§5.4.7)parse_component_value— single component value (§5.4.8)parse_list_of_component_values— list of component values (§5.4.9)parse_comma_separated_list_of_component_values— comma-separated list (§5.4.10)tokenize— token stream only (§4.3)
§References
- CSS Syntax Module Level 3: https://drafts.csswg.org/css-syntax-3/
- Spec source (Markdown):
D:\CSSWG\css-syntax-3\Overview.md
Modules§
Structs§
- Function
- §5.2 L1705-1708: A function has a name and a value (list of component values).
- Simple
Block - §5.2 L1710-1719: A simple block has an associated token (the opening token) and a value (list of component values).
Enums§
- Block
Kind - §5.2 L1710-1719: The associated token kind of a simple block,
mirroring the opening
{/[/(.
Functions§
- parse_
comma_ separated_ list_ of_ component_ values - Parse a CSS string into a comma-separated list of
ComponentValue(§5.4.10). - parse_
component_ value - Parse a CSS string into a single
ComponentValue(§5.4.8). - parse_
declaration - Parse a CSS string into a single
Declaration(§5.4.7). - parse_
list_ of_ component_ values - Parse a CSS string into a list of
ComponentValue(§5.4.9). - parse_
rule - Parse a CSS string into a single
Rule(§5.4.6). - parse_
stylesheet - Parse a CSS string into a
Stylesheet(§5.4.3). - tokenize
- Tokenize a CSS input string into a vector of tokens.