WhatCSS?

WhatCSS?

What CSS is your site actually using?

0 followers

Shrink Your Initial CSS Pageload by up to 94%? WhatCSS automatically generates a minified version of the bare minimum CSS a user needs to begin interacting with your site. WhatCSS is free / opensource.
WhatCSS? gallery image
WhatCSS? gallery image
Launch Team
Anima - Vibe Coding for Product Teams
Build websites and apps with AI that understands design.
Promoted

What do you think? …

Jon Roig
So... here's the idea: maybe it's possible to dramatically shrink the amount of CSS we send to users. Most of it, especially at load, they don't need. "Real" web developers have started doing this by just bundling their CSS with their components, so when the components render, it just fills in the CSS as well. For a lot of people, though, they're just using bootstrap / wordpress themes or monolithic CSS files. There isn't hasn't been an easy way to tell what styles are actually being used at page load.... WhatCSS is essentially a wrapper of an instance of Chrome running on a remote server. Chrome DevTools already captures CSS usage, but the browser lacks the ability to easily output and make sense of results. WhatCSS uses Puppeteer, Google's Headless Chrome Node API, to control a remote browser instance, navigate to a site, and return which stylesheets are in use when the page is fully loaded. ("domcontentloaded" for the nerds.) WhatCSS.info takes those results from Chrome, applies extra minification with clean-css, and returns BootCSS: the essential style information a visitor needs to view your site. Github is here: https://github.com/jonroig/whatcss ... would gladly accept any help with making it better.
Abdullah Abrahams
Your website is not working
Jon Roig
@theservantof Hey -- turns out, more of a demand than anticipated... totally exploded my poor VM. We're back up with better capacity.