Hello there. Some help please with ::before and ::after pseudo-elements

So I am here at ’ Applied Visual Design: Create a More Complex Shape Using CSS and HTML’, which allows me to create a heart shape with CSS.

I think the instructions to finish the task is clear, but I am a bit lost at the fundamental part. Would really appreciate some help here.

What is the relationship between the ::before /::after and its ‘parent’ element? Why is the ‘rotate’ inherited while the color isn’t?
And how should I modify them accordingly? Does the order matter?

check out this article for An Ultimate Guide To CSS Pseudo Classes And Pseudo Elements

It gives a good insight into the relationship between the ::before /::after and its ‘parent’ element .

1 Like

Thank you for reaching out!
It also helped me figured out some questions I didn’t know I had. Haha. Thanks again.

No problem, I am glad I helped you :smile: