Re:Critical CSS
by promiseofbeans on Tuesday May 06, 2025 @12:39AM
(#43901863)
Is the code somewhere? This seems like it'd be really useful as a Vite/Astro plugin
yeah, doing this manual copy-paste process every time you change something would count as cruel and unusual punishment
Re:Critical CSS
by stevenpotts on Thursday May 08, 2025 @01:24PM
(#43928668)
hehe, I know... I should think about that, I got tons of visits but unsure this is worthwhile since it appears it's not that useful for most people?
Re:Critical CSS
by al_borland on Tuesday May 06, 2025 @01:33AM
(#43902081)
FYI: While a bit of an edge case, as I don’t know why anyone would do this realistically… If a site without CSS is passed, it throws an error.
Re:Critical CSS
by stevenpotts on Thursday May 08, 2025 @01:16PM
(#43928557)
interesting! thanks!
Re:Critical CSS
by jefozabuss on Tuesday May 06, 2025 @01:37AM
(#43902101)
What was the problem with something like https://www.npmjs.com/package/penthouse ?
Re:Critical CSS
by robotfelix on Tuesday May 06, 2025 @07:44AM
(#43903993)
It's worth noting that penthouse's last release is a few weeks shy of 3 years ago (https://github.com/pocketjoso/penthouse/releases/tag/v.2.3.3).
Given there seem to be few other Critical CSS tools out there, its utility in driving web performance, and the fact Google's web.dev recommended tool (https://github.com/addyosmani/critical) uses penthouse under the hood, I'm surprised there isn't more effort and/or sponsorship going into helping maintain it.
Is it the UI for penthouse lib? Settings look very similar :)
Re:Critical CSS
by stevenpotts on Thursday May 08, 2025 @01:20PM
(#43928610)
it's based on penthouse, honestly, the most "difficult" part of this was setting up CloudRun with docker to get puppeteer to work and be able to wait whatever amount of time the user needed and netlify functions, I tried using tools like https://criticalcss.com/generate but they just didn't work because of the lack 'waiting' I guess
Feedback welcome, it's free for now.