I think "____________ in pure CSS" posts should be banned from hackernews as uninteresting novelty.
I think "____________ in pure CSS" posts should be banned from hackernews as uninteresting novelty.
I admit, at some point I did that too, it only takes ~15 lines of Python. Until I realised it becomes a lot bigger than the equivalent image file.
However I'm still a fan of proper 'X in pure CSS' where the thing is built with circles and rectangles and shadows, etc... to make the shape which actually ends up being much much smaller than the equivalent image and renders a lot faster.
Things like iPhone in pure css, or Macbook in pure css, etc...
I find it amusing that you realised that only after you wrote the script :-)
(not intended to mock you btw)
I have to disagree that 'X in pure CSS' renders faster, though. As soon as you use a couple of shadows with sufficient blur radius, a bitmap is much faster (once it's downloaded). I especially notice this when scrolling the page, if there's a lot of shadowed elements on it, it goes clunky. That's NOT saying that you should flatten all CSS trickery to bitmaps, of course, it's still very useful, just that one should take care not to go overboard and keep an eye on performance, especially checking low-powered netbooks and a few different browser/OS combos.
At first I thought I'm really up to something and going to invent the image format of the future :)
It worked in IE3 & netscape 4 but tended to crash once you got much beyond 50x50.
A agree to a point, "X done in the web standards" seems novel but shouldn't. It's very similar to "how to run photoshop in Linux" or "how to get the taste of meat as a vegan".
I like to rebound some dribbble shots with css3 http://dribbble.com/ideamonk/projects/97353-Pure-CSS3
I enjoy two aspects of this -
1. Figuring out what the overall is composed of by looking hard
2. Rendering with limited power available in CSS (no photoshop ninja here)
And sometimes I animate them too - http://heldfree.com/play/dropbox/ (best viewed in Safari)
With these I've also found a few subtle differences between how Chrome and Safari render translucent gradients, large shadows, etc.
This is a somewhat rewarding but an entertaining thing to do :)
That being said, there is also the fact that people can learn a lot about CSS by looking at the source - especially making use of pseduo-elements, etc... So I say bring on your "Vitruvian Man done in pure CSS" posts. You can always downvote them. Lot's of designers on HN want to show off their side-projects just like the developers.
Let the upvote/downvote mechanism do it's magic! If I had the time I'd recreate a scrooge for you sir.
We do have SVG but it is overkill for this and too verbose. A vector image format would take 1/20 of the code needed to implement SVG, use lower resources and be used interchangably with regular images.
A simple vector image format that behaves just like any other img (with alpha support preferably) would go a long way towards all those use cases where people use things like "made in CSS" and "icon fonts".
It seems to me that your complaint is just the verbosity of SVG. That it is overcapable is no grounds for complaint, unless that leads to excessive complexity, which I will maintain very strongly that it does not. SVG is very simple; that XML increases its verbosity slightly is about the only fault I can find with it.
This carries over the whole penalty of the SVG engine (I did said "we have SVG for this but it's overkill", didn't I?)
I'd rather have a simplistic vector rendering engine that treats the result as a plain image (e.g could just rasterize the whole thing it and leave it at that instead of treating it as DOM nodes).
That, and I would prefer the new format being binary and more compact (including more compact than compressed SVG).
The simplicity of such an engine would make it also far more likely to have been added fifteen years before to all browsers, while waiting for SVG that took like a decade to appear and is still not supported by IE less than 10.