DEV Community

Cover image for The Treachery of CSS
Alvaro Montoro
Alvaro Montoro

Posted on

The Treachery of CSS

This is a submission for DEV Challenge v24.03.20, CSS Art: Favorite Snack.

Inspiration

A donut. Or is it doughnut?
René Magritte's The Treachery of Images.

Demo

Journey

I overcomplicated everything a little bit (or a lot). Initially, I wanted to get a "realistic-looking" donut, then something that looked like a painting of a donut, and finally, just something that was reminiscent of a donut.

I used masks (so the shape was not fully rounded, and nothing got out of the main container), filters (to create blurry effects), and box shadows and radial gradients (to generate shadows and lights.)

Top comments (1)

Collapse
 
michaeltharrington profile image
Michael Tharrington

Nice!!

I think drawing a doughnut/donut is deceptively difficult. In its simplest form it kinda just looks like an innertube, haha!

But, you did a good job making your doughnut feel kinda squishy and there's a nice glaze on it. Granted, I understand it's just a representation and not the real thing — this is not a doughtnut, haha!

I'm not the official CSS Art judge or anything, but I've been personally judging these snacks by how much I'd like to eat them, and this looks quite tasty, Alvaro.

I give it four out of five bites. 😋😋😋😋