futursolo / stylist-rs

A CSS-in-Rust styling solution for WebAssembly Applications
https://crates.io/crates/stylist
MIT License
366 stars 22 forks source link

Fix whitespace after generated class #54

Closed WorldSEnder closed 2 years ago

WorldSEnder commented 2 years ago

This fixes a problem with inline syntax where & p { ... } would not insert a space resulting in confusing output.

After replacing & with the generated class name, the above should be equivalent to .stylist-hash p { }, which would insert a space correctly (between two identifiers). This fixes this discrepancy.

Also fixes an oversight where some tests where not executed due to missing the #[test] attribute.