Lightning CSS v1.21.1 is out with fixes for logical property fallback, incompatible rule splitting, license comment preservation, selector compat data, and more. Check it out! ⚡️
github.com/parcel-bundler/li…
Raw values avoid needing to fully specify the whole AST when returning new CSS values. You can just return a raw CSS string, which Lightning CSS will parse and insert into the AST for you.
lightningcss.dev/transforms.…
ALT Example of a visitor that replaces a custom color() function with a raw CSS value.
Custom at-rules are validated during parsing, and fully type safe in visitors. We use the definition to automatically infer the types of the prelude and body so you can avoid unnecessary checks.
Check out the docs to learn more! lightningcss.dev/transforms.…
Performed some magic with TypeScript so the rule types in custom visitors are actually inferred from this definition too! 🤯
ALT Code showing two custom at rule definitions, and a custom rule visitor. TypeScript inlay hints are shown for the prelude and body of each rule type based on an if statement checking the rule's name.
Lightning CSS v1.17.0 is out! ⚡️
🪺 Updated nesting syntax
🦋 Rust visitor API for building custom transforms
🖨️ Support for @page margin rules
🗜️ Simplify :is() selector with a single simple argument
📺 Fix media query parenthesization
github.com/parcel-bundler/li…
Yesterday we released v1.16.1, which includes bug fixes for nesting, border shorthands, and auto prefixing. Also improved browserslist integration in the CLI!
github.com/parcel-bundler/li…
New release! ⚡️
Lightning CSS now supports relative color syntax, which allows you to adjust colors with math functions! If you've ever wanted to lighten or darken a color, now you can – and a lot more.
Playground: lightningcss.dev/playground/…
Release notes: github.com/parcel-bundler/li…
ALT An input lch color, adjusting slateblue by darkening it 10%. Output shows a hex color, and calculated lch value.
Lightning CSS v1.15.0 is out! ⚡️
Includes support for bundling with inline source maps, an option to preserve imports when analyzing deps, fixes for cascade layers, flex shorthand, custom media queries, and more.
github.com/parcel-bundler/li…