PostCSS Match
PostCSS plugin for Rust-style pattern matching.
, }}
In conjunction with postcss-simple-vars:
$,,, _ => }}
Usage
See PostCSS docs for examples for your environment.
Differences from Rust and other known limitations
- Braces around arm expressions are non-optional
- Nested
@match
at-rules are currently unsupported - Rust-style range patterns are currently unsupported
- Pattern exhaustiveness is not checked
- Pattern unreachability is not checked