Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

> I’m sure I can do better still, for instance the CSS block is still quite large (too many rules, not minified yet)

CSS doesn't minify particularly well since the class names, tag names, and attributes all have to stay in their full form. Basically it just ends up being removing extraneous whitespace.

However, ever since reading James Hague's post on "Extreme Formatting"[0], I've rather liked CSS without all the extra whitespace. For example, [1]. You can see all the rules at a glance, and while it's a bit weird at first, I think you can get used to it pretty quickly. But then again, I've always sort of thought APL/J/K are beautiful in their own way.

[0] http://prog21.dadgum.com/200.html [1] http://prog21.dadgum.com/p21.css



But if everything that could possibly reference a class or tag or attribute is inlined into the same file then you know exactly what the scope of your CSS is for that particular request. So it should be possible to minify even the names.


Hm. A minimizing post-processor for a webpage and all the resources that it loads. That's an interesting idea which means it has probably already been done.


Doesn't mean it's been done well, it's been done to the point it's usable to anyone other than the originator, or it's been done and subsequently published in a way that's available to the general public, though :)


I'm not sure that would gain much, what with the compression that's ordinarily done anyways.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: