Critical CSS? Not So Fast

This page summarizes the projects mentioned and recommended in the original post on news.ycombinator.com

Our great sponsors
  • SurveyJS - Open-Source JSON Form Builder to Create Dynamic Forms Right in Your App
  • WorkOS - The modern identity platform for B2B SaaS
  • InfluxDB - Power Real-Time Data Analytics at Scale
  • critical

    Extract & Inline Critical-path CSS in HTML pages

  • I am a fan of CSSWizardry and yet I find this post misleading. The examples shown are ways NOT to do frontend performance engineering.

    The current best performant way to load JS is asynchronously as documented at https://web.dev/efficiently-load-third-party-javascript/.

    And the best way to load CSS is with Critical Path CSS + Async CSS as documented at https://web.dev/defer-non-critical-css/.

    The easiest way to generate Critical CSS is https://github.com/addyosmani/critical where you may suggest multiple resolutions.

    I have found https://github.com/addyosmani/critical-path-css-tools to be a great resource to master critical path CSS which improves page render speeds. It helps build fast rendering sites, sometimes even sub-second renders given you have a low latency backend.

  • critical-path-css-tools

    Tools to prioritize above-the-fold (critical-path) CSS

  • I am a fan of CSSWizardry and yet I find this post misleading. The examples shown are ways NOT to do frontend performance engineering.

    The current best performant way to load JS is asynchronously as documented at https://web.dev/efficiently-load-third-party-javascript/.

    And the best way to load CSS is with Critical Path CSS + Async CSS as documented at https://web.dev/defer-non-critical-css/.

    The easiest way to generate Critical CSS is https://github.com/addyosmani/critical where you may suggest multiple resolutions.

    I have found https://github.com/addyosmani/critical-path-css-tools to be a great resource to master critical path CSS which improves page render speeds. It helps build fast rendering sites, sometimes even sub-second renders given you have a low latency backend.

  • SurveyJS

    Open-Source JSON Form Builder to Create Dynamic Forms Right in Your App. With SurveyJS form UI libraries, you can build and style forms in a fully-integrated drag & drop form builder, render them in your JS app, and store form submission data in any backend, inc. PHP, ASP.NET Core, and Node.js.

    SurveyJS logo
  • critters

    🦔 A Webpack plugin to inline your critical CSS and lazy-load the rest.

  • I find critters[0] quite easy to work with and well worth implementing on my nextjs or Astro projects.

    I build a lot of landing pages so there are very few multi page visits.

    [0] https://github.com/GoogleChromeLabs/critters

  • styled-system

    ⬢ Style props for rapid UI development

  • I'm a huge fain of Tailwind but if you're using react you can also consider styled-system:

    https://styled-system.com

    It seems to have a lot of the benefits of Tailwind but better integration with Typescript.

  • penthouse

    Generate critical css for your web pages

  • It is easy with a little automation :). In the build process, adding a step to calculate critical path css helps. This should probably be the last step and run on production post deploy. The calculated CSS is stored in redis which will be appended in the head for subsequent requests. This tool had inspired me to build this process at multiple orgs I have worked with https://github.com/pocketjoso/penthouse.

    Agree on the async JS part but I guess browser makers will solve it soon.

  • WorkOS

    The modern identity platform for B2B SaaS. The APIs are flexible and easy-to-use, supporting authentication, user identity, and complex enterprise features like SSO and SCIM provisioning.

    WorkOS logo
NOTE: The number of mentions on this list indicates mentions on common posts plus user suggested alternatives. Hence, a higher number means a more popular project.

Suggest a related project

Related posts