{"id":268901,"date":"2018-04-04T06:37:13","date_gmt":"2018-04-04T13:37:13","guid":{"rendered":"http:\/\/css-tricks.com\/?p=268901"},"modified":"2021-08-03T12:51:02","modified_gmt":"2021-08-03T19:51:02","slug":"why-would-you-do-that-in-css","status":"publish","type":"post","link":"https:\/\/css-tricks.com\/why-would-you-do-that-in-css\/","title":{"rendered":"Why would you do that in CSS?"},"content":{"rendered":"\n

And by that<\/em>, it’s usually some kind of CSS experiment, often an elaborate drawing or interaction.<\/p>\n\n\n\n

For example, have you seen Lynn Fisher’s extraordinary A Single Div<\/a> project? Not only are all these graphics drawn in just HTML and CSS, they are all created with (you guessed it) a single <div><\/code>.<\/p>\n\n\n\n

\"\"<\/figure>\n\n\n\n

Why would she do that? Here’s one pertinent possibility: it’s none of our business. We’re free to wonder, or even ask if it’s done respectfully enough. But does it really matter? Let’s stop short of assuming she doesn’t know what’s she’s doing, assuming it’s a twisted form of pain, or that she’s unaware of other technologies. Check out the example where she drew the official SVG logo with CSS and a single div. Woke.<\/p>\n\n\n\n\n\n\n\n

\"A<\/figure>\n\n\n\n

I even kinda get it. I wrote a whole book about SVG<\/a> because I think it’s underused. Are there “CSS drawings” that I think would be better as SVG for a production site meant to last? Sure.<\/p>\n\n\n\n

How about this one?<\/p>\n\n\n\n