News for hackers. Stuff that matters.
Re:Photoshop vs CSS by borplk on Saturday January 05, 2013 @03:29AM (#5012088)
That pixel by pixel approach is just an 'abuse' of 'pure css'. Of course you can have 1x1 px elements and colour them and get a proper image.

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...

Re:Photoshop vs CSS by zaphoyd on Saturday January 05, 2013 @09:48AM (#5012742)
I am also a fan of "X in pure CSS" in moderation, particularly the ones that model things that I've needed to do to implement certain simple embellishments in ways where using images makes the site harder to change/maintain/retina-fy. For example, speech bubbles, arrows, engraved text, rounded objects, some types of icons, etc.
Re:Photoshop vs CSS by tripzilch on Saturday January 05, 2013 @09:04AM (#5012640)
> 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.

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.

Re:Photoshop vs CSS by borplk on Sunday January 06, 2013 @10:47AM (#5016568)
> I find it amusing that you realised that only after you wrote the script :-)

At first I thought I'm really up to something and going to invent the image format of the future :)