‹ BackHN Continuity

Thread

Improving site performance by shipping more CSS

96 points · 72 comments · torutofu

  1. lloydatkinson · · focus · HN ↗
    Any time I see criticism of CSS in JS, and a move to CSS modules, I get sad they didn’t just do a bit more research. You can have both, while also not shipping any JS runtime for CSS in JS! And with TypeScript support.

    <a href="https:&#x2F;&#x2F;vanilla-extract.style&#x2F;" rel="nofollow">https:&#x2F;&#x2F;vanilla-extract.style&#x2F;

    1. wonnage · · focus · HN ↗
      The Achilles heel of this class of library (including stylex, Linaria, etc.) is precedence. You either have to use a runtime and some complicated merging rules (e.g longhand overrides shorthand) or compile every possible combination of the styles at build time.
Open on Hacker News to reply ↗

Unofficial Hacker News client; not affiliated with Y Combinator.