Inspiration
As a frontend engineer, you seldom encounter artistic CSS, so participating in this challenge was a rare treat. It also made me hungry for grapes, haha!
Demo
Journey
I want to admit that I cheated a little bit with the stem using a realistic-looking svg. My first draft utilized the clip-path
property. However, its effect was quite cartoonish, so I dumped it.
The submission utilizes the following CSS properties:
-
display: grid
was quite handy in creating the distribution of berries. - Gradients, shadows, and filters to create a somewhat photorealistic grape.
- CSS variables.
-
:nth-child
selector to introduce a little variety for the berries' shapes and sizes. - CSS animation so you could "squeeze" those berries.
- Units -
vh
and%
- to create responsiveness.
Top comments (2)
Dig the little squish happening when you hover over each grape 😄
Ahh! This is by far the best contest submission I have seen yet.
Phenomenal job, keep up the good work!