By Greg Nowak. Last updated 2026-07-06.
Critical CSS is the small slice of styling a browser needs to render the first visible part of a page. If a large stylesheet sits in the <head>, the browser may need to download and process it before it can paint useful content. Inlining the right CSS can make a page feel alive sooner.
That does not make critical CSS a universal fix. For a business site, the useful question is not whether Google likes faster pages. The useful question is whether render-blocking CSS is actually delaying the pages that matter: service pages, campaign landing pages, quote forms, ecommerce category pages, or high-traffic editorial templates.
Start With the Bottleneck
Critical CSS should come after measurement, not before it. Use Lighthouse, PageSpeed Insights, WebPageTest, or Chrome DevTools to see what is really slowing the first useful render. If the main delay is server response time, an oversized hero image, web font loading, third-party scripts, or JavaScript hydration, inlining CSS may add complexity without moving the business metric.
It is most promising when important templates share a large stylesheet, Lighthouse flags render-blocking CSS, and the largest visible content is waiting on layout and styling rather than image transfer. It is less promising when your CSS is already small, your pages are highly unique, or your CMS allows editors to assemble unpredictable first screens.
| Decision | Evidence to Look For | Practical Action |
|---|---|---|
| Use it | Render-blocking CSS delays first render or LCP on valuable templates. | Generate critical CSS per template in the build or release process. |
| Pilot it | Large shared CSS bundle, but mixed causes in the waterfall. | Test one or two lead-generating templates before rolling it across the site. |
| Skip it for now | Slow TTFB, heavy images, JavaScript, or unstable layout are the bigger problems. | Fix those bottlenecks first, then retest CSS delivery. |
What Belongs in the Critical Layer
Keep the critical layer boring and small. It should cover the base layout, typography needed for the first screen, header, navigation, hero area, visible buttons, and any above-the-fold form fields. It should also preserve reserved space for visible media so the first render is not followed by a layout jump.
Leave out below-the-fold components, footers, admin styles, editor-only UI, rarely used utility classes, animations, and page-builder widgets that do not appear immediately. Be careful with font rules and background images. Sometimes they belong in the first render; often they are better loaded normally or intentionally ignored during extraction.
Make It a Repeatable Build Step
Manual critical CSS ages badly. Online generators are fine for proving the idea, but production work should run from the same templates, routes, and assets your site actually deploys. Generate by page family, not by random individual URLs, and test both mobile and desktop viewports because breakpoint-specific layout rules are easy to miss.
For Node-based builds, the critical package remains a practical starting point:
pnpm add -D criticalimport { generate } from 'critical';
await generate({
base: 'dist/',
src: 'index.html',
inline: true,
target: {
html: 'index-critical.html',
css: 'critical.css'
},
dimensions: [
{ width: 390, height: 844 },
{ width: 1280, height: 900 }
]
});Watch the maintenance details: asset paths, CDN URLs, web fonts, cookie banners, logged-in CMS states, and editor-controlled blocks. Also be cautious with extraction options that create page-specific non-critical CSS files. A template can look faster in a one-page test while losing cache efficiency across the wider site.
Pair It With CSS Cleanup
If the global stylesheet has years of legacy selectors, critical CSS is only part of the answer. Remove unused CSS carefully, then keep the critical layer small. PurgeCSS can help, but CMS and JavaScript classes must be safelisted or you will remove styles that only appear at runtime.
await new PurgeCSS().purge({
content: ['templates/**/*.html', 'src/**/*.js'],
css: ['dist/app.css'],
safelist: [/^is-/, /^has-/, /^js-/],
rejected: true
});Review the rejected list during rollout. That quick check often catches over-pruning before a campaign page, menu state, or form validation message breaks in production.
Drupal Notes
For Drupal sites, the critical_css module is still available. As of July 2026, Drupal.org lists the module as feature-complete with maintenance fixes only, and the stable 2.0.x release supports Drupal 9, 10, and 11:
composer require 'drupal/critical_css:^2.0'The important detail is that the module does not remove the need to generate critical CSS. It loads the critical file you provide and can load other head CSS asynchronously. Treat it as a Drupal delivery mechanism, while your build or release process remains responsible for producing accurate CSS for each template.
Measure the Business Impact
Critical CSS can support SEO, but it is not a ranking shortcut. Google’s current Core Web Vitals are LCP, INP, and CLS. Critical CSS mainly helps the loading and rendering side of that picture; it will not fix poor interaction latency or layout instability unless those problems are connected to CSS delivery.
Measure before and after on anonymous mobile pages. Look at render-blocking resources, LCP element timing, visual stability, and whether forms or calls to action become usable sooner. Then monitor Search Console field data after enough real users have visited. The win is not a perfect synthetic score. The win is a page that feels credible faster and gives prospects less time to leave.
If you need a practical read on whether critical CSS is worth the effort, Greg can help you scope the right performance fix across CSS delivery, Drupal theming, front-end build workflow, and conversion-critical templates.
Related on GrN.dk
- Why Your Website's Third-Party Stack Needs a Real Owner
- Optimizing Drupal: A Practical Speed Checklist
- WordPress Google PageSpeed: Practical Fixes for Core Web Vitals
Need help with this kind of work?
Get help scoping the right performance fix Get in touch with Greg.