Ask HN: Review my app, UnusedCSS.com
unusedcss.com
unusedcss.com
For instance, I fed it the root URL, and most of the unused selectors it surfaced are in fact used on other parts of the website.
For most of the sites I've worked on, I bundle up the CSS into a main stylesheet and then often one specific stylesheet per-section. If this could spider the whole site and generate a report on that then it would certainly be more useful.
I halfway implemented traversing whole sitemaps, but never finished because the waits were getting so long that I would need to move away from django and towards something like twisted where I could incrementally update the results and work asynchronously.
Would you rather give a sitemap or a representative list of URLs?
I would prefer it to work along the same lines as http://validator.w3.org/checklink where it just automatically spiders
It would be cooler if you could feed it a CSS file and have it return a better version of it, well and concisely formatted without redundant declarations, using shorthand etc.
That would take this from something that doesn't really need doing - like css minification in a world where gzip exists, such as our world - to something that would show people a better way to produce CSS and still retain that original functionality if you're convinced there's a need for that.
1.) Maintainability. Promote re-use of selectors and organization of your css files. I find that CSS gets sloppy very quickly and there will be lots of non-DRY, redundant selectors, as well as legacy selectors that no one will ever remove because "what if something is still using it?" Your css files will slowly get larger and larger, and never smaller. This leads to the next point.
2.) Smaller file size. Less bandwidth used, faster requests. Yahoo has done a ton of research on the benefits of performant web apps: http://developer.yahoo.com/performance/rules.html
Maybe even optimize the file by removing all spaces, tabs, line breaks.
I found that I am often at a machine without Firefox, or I don't want to install an addon (or addon for an addon in the case of CSS Usage) just to quickly find out what CSS selectors aren't being used on a given page.
All feedback is very welcome!
I agree... works well. But in the case of http://inclojure.com/ it says the URL is broken.
On a positive note, I tried it on 2 other sites, and it works really well. Great job.
I will look in to it right now, thanks for the feedback!
The other solutions to this problem that I have found _do_ require a plugin in the form of Firefox addons.
This was my main motivation for creating the site; making it accessible from wherever I happen to be, regardless of my current browser and browser plugins.
Of the following, what would you prefer?
* Ability to enter a sitemap that would be scanned
* Abililty to enter multiple, representative URLs directly
* Or your idea to automatically follow links N layers deepIf I could make one suggestion, it would be to ignore some common CSS reset and CSS framework stylesheets to lower the number of false positives; when I scan my site I get a lot of unused selectors from these files, and you would detect them reasonably reliably just by looking at their filenames.
Right now you can click on the arrow next to a stylesheet's name to hide it. Would you want to be able to completely remove it from the results, rather than just hide it?
I'd guess it doesn't like the inline data: URL I use for an alternate stylesheet.
Thanks.