Files
craft-libs/crates/svg

Simple stylesheet compatibility subset

simple_css preserves EffectCraft's compound tag/class/id stylesheet grammar and indexed matching budget, rather than substituting the richer selector semantics of paths. Property values remain text; color precision, path-prefix behavior and geometry policy stay with the importer. Call parse for each sheet, then StyleSheet::index; discard the sheet after a parse error and reject the import when its matching-work callback refuses.

The parser/matcher and structural tests were ported from EffectCraft 60e2cbbbe3d73c0a9074c25a1a615ccfec18721c, originally by FredApps. Nested at-rule skipping and its regression test preserve NetterSilver's 10e173c0e49696ad335e3da8a069889c089b09a6; both contributors retain primary Git authorship for their respective port commits. Source and destination use MIT OR Apache-2.0. The shared adapter adds an aggregate 64 MiB stylesheet-text limit and idempotent indexing.