Repository  -  API  -  Source


  • You can now render exclusively with JavaScript disabled. pull#312 Thanks @VladislavTkachuk


  • Big optimization. By looking up the "parent CSS selector" pre-emptively it can quickly discard repeated "child CSS selectors". pull#296


  • Ignore <link rel="preload"> and <link rel="prefetch"> tags whose href value was a .css extension. pull#275 Thanks @nicolas-t


  • By default, Service Workers are disabled. This new feature requires an upgrade of puppeteer to ^1.8.0. pull#265

  • Ability to also extract the CSS of all style tags with the styletags option. pull#260 Thanks @jc275


  • Not crash if the CSS contains multiple semicolons which crashes csso ( pull#259 Thanks @jc275

  • Stylesheet link tags whose href URL contains a #fragment-example would cause an error because puppeteer doesn't include it in the response.url(). pull#255 Thanks @jc275


  • New option ignoreJSErrors to ignore possible JavaScript errors. pull#253 Thanks @jc275


  • New option ignoreCSSErrors to ignore possible CSS parsing errors. pull#249 Thanks @stereobooster


  • Throw explicit errors on invalid CSS pull#237 Thanks @harrygreen


  • List what timed out. Useful for debugging which resources failed. pull#199 Thanks @stereobooster

  • Upgrade to puppeteer 1.4.0 pull#214


  • Ability to pass an object of options to csso.compress() pull#167 Thanks @usebaz


  • Fix for logic of using the --withoutjavascript argument. pull#163 Thanks @stereobooster

  • Upgrade puppeteer dependency to version 1.2.

  • Fix for 304 Not Modified responses that actually don't redirect. pull#165 Thanks @stereobooster


  • Fix for pages that uses data:text/css ... as the href i <link> tags. pull#159


  • Data URIs in external stylesheets lost the data: part. pull#153 Thanks @stereobooster and @phiresky for reporting.


  • Any query strings in URLs in CSS is now preserved. pull#148 Thanks @usebaz


  • Important fix for how multiple external stylesheets are parsed in the exact order the <link rel=stylesheet> tags appear in the HTML. pull#131

  • The response interceptor skips or includes resources based on responseType instead of URL and filename. pull#118 Thanks @stereobooster


  • Redirects, both of external style sheets and other URLs is now correctly followed. pull#106

  • Remove @media print rules. pull#101

  • Switching to wait for networkidle0 instead to allow the page slightly more time to finish more XHR and static resources. pull#87


  • All @font-face rules whose name is never mentioned in any remaining selector is now deleted. pull#81

  • Rules inside keyframe at-rules are not analyzed. pull#83


  • Much better error handling. If a CSS file fails to download or some JavaScript on the page throws an error, the minimalcss process now exits immediately, closes the puppeteer instance, and triggers the rejection on the main promise. Thanks @stereobooster pull#65


  • Supports setting viewport. Both via the cli and via the pure API. Thanks @stereobooster pull#64 And works on the cli by passing a JSON string pull#78


  • Works with and requires puppeteer 1.0.0. pull#74 Thanks @jonathaningram


  • Engine massively refactored by the author of csstree and csso himself; @lahmatiy

  • The minimalcss.minimize() functions promise no longer contains a stylesheetAstObjects objects. It wasn't clear which AST it should be. Thanks again @lahmatiy

  • Redundant and never referred to keyframes get automatically removed. pull#57.

  • now helps maintain dependency upgrades.


  • Every URL you pass gets loaded twice. First without Javascript and then with JavaScript (and waiting for network to be idle). These means the minimal CSS will contain CSS that was necessary before the page is fully loaded as well. Also, the engine has entirely changed. Instead of evaluating the DOM inside a page evaluation (the equivalent of running in the Web Console), puppeteer is only used to 1) download relevant assets and 2) yield the DOM as a string of HTML. Instead cheerio is used to compare the CSS to the DOM. pull#53


  • Any errors raised internally by document.querySelector() are not swallowed unless run with options.debug == true pull#40


  • Option to override user agent used by puppeteer. pull#37 Thanks @stereobooster

  • Correction of relative URLs in CSS fixed. E.g. url(images/img.png) in /styles/main.css now becomes url(/styles/images/img.png) pull#28 Thanks @stereobooster

  • New option browser if you already have a puppeteer Browser instance you can pass that in. pull#36 Thanks @stereobooster

  • Errors thrown if any necessary .css download can't be found. pull#27 Thanks @stereobooster

  • New repeatable string argument --skip to cli to selectively skip downloading certain URLs. pull#31


  • Ability to pass a function skippable which can help cancel certain network request. pull#20 Thanks @stereobooster

  • Option to actually load images if you need it to. #26



  • Don't choke on blob: stylesheet link objects. Thanks @stereobooster

  • Use TypeScript to do type checking for development. Thanks @stereobooster



  • Correctly ignore all request that are images by extension.



  • Important fix for parsing all media queries.



  • The main minimize function returns an object (which contains .finalCss) instead of just the CSS. Useful to be able to see the stylesheets it parsed.

  • debug option which adds all console.log that happens to stdout. Off by default.

  • Upgrade to css-tree 1.0.0-alpha24

  • List of "dead obvious" selectors that don't need to be analyzed like *, body, and html.

  • Clean up repeated important-comments in the concatenated CSS.

  • Updated README with example how to use a catch.


  • Trivial package refactoring.


  • Better error handling on failed page navigation


  • Basic CLI working.