DEV Community

Cover image for The Treachery of CSS
Alvaro Montoro
Alvaro Montoro

Posted on

15 1 1 1

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

Do your career a big favor. Join DEV. (The website you're on right now)

It takes one minute, it's free, and is worth it for your career.

Get started

Community matters

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

Sentry image

See why 4M developers consider Sentry, “not bad.”

Fixing code doesn’t have to be the worst part of your day. Learn how Sentry can help.

Learn more

👋 Kindness is contagious

Immerse yourself in a wealth of knowledge with this piece, supported by the inclusive DEV Community—every developer, no matter where they are in their journey, is invited to contribute to our collective wisdom.

A simple “thank you” goes a long way—express your gratitude below in the comments!

Gathering insights enriches our journey on DEV and fortifies our community ties. Did you find this article valuable? Taking a moment to thank the author can have a significant impact.

Okay