Post by @fasnix

Replying to @fasnix
Uwe Trenkner
@utrenkner @mastodon.green

@fasnix @nocci
There are quite a few tools that can extract, what is really needed.

But it is not as simple as it sounds. A lot of CSS rules are made dependent on the actual screen dimensions. Some rules may not be used on a large screen, and so on.

Others may be used only when certain JavaScript is triggered.

flo
@fasnix

@utrenkner@mastodon.green
That's a good point, thanks for the hint.

@nocci@huch.wasn.nu

Replying to @fasnix
Christopher Kirk-Nielsen
@chriskirknielsen @front-end.social

@fasnix you can use DevTools in Chrome with the Coverage tab to get an idea. But that runs on a live page. And as another replily mentioned, non-matched media queries and non-triggered interactions will make skew the numbers towards more unused CSS than is the case.

Replying to @fasnix
Replying to @kaleb@haugenh.us
flo
@fasnix

@kaleb@haugenh.us
Thanks, however the link I wanted to test produces an 502 error.
Maybe, because it's on a subdomain?

Replying to @fasnix
⁂ Kaleb
@kaleb @haugenh.us

@fasnix hmm. I haven’t had that problem, but it sounds like an issue on your server.

There are other tools that work offline you might want to try, like this one for VSCodium/VSCode: github: robwizzie / unused-css-detector

Replying to @kaleb@haugenh.us
flo
@fasnix

@kaleb@haugenh.us
Well, it's not my server, I tested a template on another server/subdomain.

Thanks, I'll check the tool tomorrow.