DEV Community

Cover image for CSS Art: Cupid
Alvaro Montoro
Alvaro Montoro Subscriber

Posted on

15 2 2 2 1

CSS Art: Cupid

This is a submission for Frontend Challenge - February Edition, CSS Art: February.

Inspiration

February is Black History Month, American Heart Month, National Bird-Feeding Month... not to mention that it's the month of big dates like Valentine's Day or Groundhog Day, and the birth month for Galileo Galilei or Charles Darwin.

Maybe of all those, I opted for the easiest and cheesiest one: Valentine's Day. I had found an illustration I liked by Ian Mikraz on Unsplash and decided to give it a go and try to replicate something similar in HTML+CSS.

Demo

You can check a live demo with the illustration on CodePen:

Journey

As in paper drawing, I tried to break the illustration into parts before starting:

  • Clouds
  • Stars
  • Cupid
    • Body
      • Arms
      • Robe
      • Bow and arrow
      • Wings
      • Neck
    • Head
      • Hair
      • Mouth
      • Eyes
      • Cheeks
      • Ear

Then I created shapes for those parts and put them together little by little. You can find how to create different shapes in CSS in one of my previous posts from DEV. The whole process took around 1 hour and 45 minutes, broken in smaller sessions because I had to do some chores.

If you are curious about the process, here's a time-lapse of the live coding process:

...And after all that... I forgot to add the wings to the Cupid (you may notice they are missing in the cover image but not in the demo). I added them afterwards.

Fun fact: as it is coded in CSS and it uses custom properties for the colors, you can easily personalize the Cupid to make it however you want (check lines 6-20 in the CodePen above). For example, here's another version:

cartoon of a Black cupid with a bow and arrow

AWS GenAI LIVE image

Real challenges. Real solutions. Real talk.

From technical discussions to philosophical debates, AWS and AWS Partners examine the impact and evolution of gen AI.

Learn more

Top comments (4)

Collapse
 
ansellmaximilian profile image
Ansell Maximilian

Congrats!

Collapse
 
hirushi_nethmini_41168bb8 profile image
Hirushi Nethmini

It's nice.

Collapse
 
sanjaysah profile image
Sanjay Kumar Sah

Very impressive

Collapse
 
alvaromontoro profile image
Alvaro Montoro

Thanks

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

Engage with a wealth of insights in this thoughtful article, valued within the supportive DEV Community. Coders of every background are welcome to join in and add to our collective wisdom.

A sincere "thank you" often brightens someone’s day. Share your gratitude in the comments below!

On DEV, the act of sharing knowledge eases our journey and fortifies our community ties. Found value in this? A quick thank you to the author can make a significant impact.

Okay