News for hackers. Stuff that matters.
Re:Single Element MacBook Pro with CSS by javajosh on Wednesday August 15, 2012 @11:07AM (#4386298)
Cool, and I'm glad that someone is demonstrating a way to use CSS3 to create graphics in a way that doesn't require extra markup. One of the biggest problems with CSS3 is that, in a twist of irony, it's image composition power entices developers into adding markup to hang the CSS off of. This ends up complicating the markup merely to generate an image, which is a mistake.

This technique, on the other hand, using the :before and :after selectors shows the right way to use CSS3 image composition, if you choose to do it. This example should be shouted from the hilltops to all front-end web devs.

Re:Single Element MacBook Pro with CSS by ender7 on Wednesday August 15, 2012 @11:45AM (#4386487)
This should be an SVG. Using box-shadows to create shapes is not only confusing but really, really performance-draining.

(not to be a downer, it's incredibly impressive, but not something you should do in production code)

Re:Single Element MacBook Pro with CSS by joshnh on Wednesday August 15, 2012 @06:38PM (#4388668)
Spot on. I clearly state in the description field that it is only an experiment.
Re:Single Element MacBook Pro with CSS by javajosh on Wednesday August 15, 2012 @11:52AM (#4386534)
SVG fills me with dread. Canvas, maybe.
Re:Single Element MacBook Pro with CSS by eblume on Wednesday August 15, 2012 @12:10PM (#4386649)
Why does SVG fill you with dread? (Honest question.)
Re:Single Element MacBook Pro with CSS by toyg on Wednesday August 15, 2012 @08:42PM (#4389264)
Probably because of "wall-of-xml" syndrome.

Of course, SVG should be generated by tools rather than typed by hackers, but people tend to forget that.