1. 20
  1.  

  2. 3

    It’s not really clear to me what this is for. I guess it lets you use some bleeding edge CSS features without needing scss, but then you still need a compiler so why not just use scss?

    1. 3

      This isn’t exactly analogous. Unlike scss it’s not a different language that transpiles to CSS. It’s more like what babel is for JS in that it’s a build tool that allows you to transpile to more backward compatible targets of the same language, CSS.

      so why not just use scss

      There aren’t any scss build tools that are as fast. There’s an appeal to some people to just use “CSS but with modern features” over an entirely separate language. And this also bundles/minifies so it’s more of the entire toolchain.

      It was made to revamp CSS bundling in Parcel. There’s been a trend to rewrite JS build tools in other languages (mostly Go and Rust) to make them orders of magnitude faster. This brings that trend to CSS build tooling.

    2. 2

      I really do like this trend of rust tools coming out. Very nice website too.

      Now the question: if I am using something like svelte - would I ever actually use this?

      1. 1

        Svelte would use it internally to build its components into a final bundle.

      2. 2

        Just the sort of thing I was looking for. I’ve gone from Sass (indented) + PostCSS, to SugarSS and only PostCSS, then to vanilla CSS despite the ugly, redundant syntax to simplify tooling. CSS is powerful enough now, especially with variables and :is(), that the biggest benefits I was getting from PostCSS was Autoprefixer and just validating that it parses. With this tool, Lightning CSS, I can replace the complexities of a npm-based setup (within Nix it becomes a pain) with a standalone Rust binary. Very cool, and the direction Parcel keeps heading in is one of great progress (looking at you Webpack).

        1. 2

          I purged my last use of Webpack last month and I hope never to touch it again. :-)

          1. 1

            And I opened a Nixpkgs merge request if anyone wants to review: https://github.com/NixOS/nixpkgs/pull/190754

            1. 1

              Already merged :)