Skip to main content

Stylelint plugin for CSS performance budgets

Ship CSS with a rendering budget.

stylelint-plugin-css-performance-budget warns on heavy selectors, render-blocking imports, expensive filters, layout-thrashing declarations, paint-heavy effects, fixed scroll surfaces, and motion that needs a reduced-motion escape hatch.

Release-safe defaults

Starts with low-noise rules that catch expensive rendering patterns before they ship.

AST-first checks

Rules use targeted PostCSS walks and parser-aware value helpers instead of full-root rescans.

Static rule docs

Every rule includes examples, options, and preset membership generated from metadata.

  • npm license
  • npm total downloads
  • latest GitHub release
  • GitHub stars
  • GitHub forks
  • GitHub open issues
  • Codecov coverage

13 rules

โ€ข Rule coverage

Selector, layout, paint, animation, import, and accessibility budget checks.

3 configs

โ€ข Config surfaces

Recommended, strict, and all profiles for different adoption levels.

Stylelint 16+

โ€ข Release gate

Supports Stylelint 16 and 17 with a single codebase and unified docs.

Adoption path

Pick the budget that matches your release bar.

๐ŸŸข Start here

๐ŸŸข Recommended budget

Enable the practical baseline for teams that want performance warnings without a noisy first run.

Open config

๐Ÿ›ก๏ธ Tighten review

๐Ÿ›ก๏ธ Strict budget

Use the stricter public profile when performance regressions should block review earlier.

Open config

๐ŸŸฃ Full audit

๐ŸŸฃ All rules

Turn on every rule, including specialized audits for custom properties and fixed layers.

Open config

Rule lanes

Performance checks grouped by rendering risk.

Project surfaces

Docs, runtime metadata, and maintainer references are linked from the front page.

Install

โ€ข Getting started

Install the package, choose a config, and wire the plugin into an ESM Stylelint config.

Open section

Reference

โ€ข Rule catalog

Browse the full rule list with examples, options, and guidance for rollout decisions.

Open section

Maintain

โ€ข Developer docs

Inspect exported types, config contracts, and generated API documentation for maintainers.

Open section