3 ms·
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 wi
by javajosh 14y ago
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.
- ender7 14y agoThis 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)
- javajosh 14y agoSVG fills me with dread. Canvas, maybe.
- eblume 14y agoWhy does SVG fill you with dread? (Honest question.)
- toyg 14y agoProbably 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.
- drhowarddrfine 14y agoI love SVG.
- joshnh 14y agoSpot on. I clearly state in the description field that it is only an experiment.