Critical is a tool for extracting and inlining the minimum CSS required to render above-the-fold content. It identifies the styles necessary for the initial visible portion of a page to reduce render-blocking requests and improve page load speed.
The project generates resolution-specific stylesheets to optimize the initial paint across different device dimensions. It includes a utility to rebase asset URLs within extracted styles, ensuring that images and fonts load correctly when stylesheets are moved to different directories or content delivery networks.
The tool provides a command-line interface for integrating the extraction process into automated build pipelines. It supports excluding specific selectors from being inlined to defer non-essential assets and uses headless browser analysis to match CSS rules against the visible viewport.