Go back

The great CSS expansion πŸš€

New CSS capabilities replace JavaScript libraries, shrink bundles, and improve Core Web Vitals.

The great CSS expansion πŸš€

Pavel Laptev explored how new CSS capabilities are gradually replacing JavaScript libraries.

The article offers direct comparisons: things we used to do with JS can now be implemented natively. And without workarounds, with code that is actually readable.

πŸ“¦ The results in practice:

  • ~300 KB less in the bundle
  • better Core Web Vitals
  • fewer dependencies and less pain dealing with them

The main point: CSS has long since moved beyond β€œstyling” to full-fledged interface logic.

If supporting old browsers is not critical for you, this is a great reason to revisit your stack and throw out unnecessary libraries πŸ’‘

Read

Copied