Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found

Submitted

recipe-card

@devkhrmnturk

Desktop design screenshot for the Recipe page coding challenge

This is a solution for...

  • HTML
  • CSS
1newbie
View challenge

Design comparison


SolutionDesign

Solution retrospective


What are you most proud of, and what would you do differently next time?

sorry for the long and complicated codes.

Community feedback

P
beowulf1958 1,350

@beowulf1958

Posted

Congratulations on completing this challenge! The desktop and mobile versions look great, and you solved the real challenge, which was to color the list markers. Many people who attempt this challenge ignore this detail entirely. Your solution is unique to say the least.

That said, there is an easier way: use the CSS ::marker pseudo-element. This pseudo-element allows you to style the bullets and decimals in front of each list item in a list. This article explains how to use it.

So, for example, if you remove the <p class="scale">&bull;</p> and <p>1.</p> elements and change the instructions list to an <ol>, you could save yourself a dozen lines of code by using:

      /* for list styling */
      .preparation li::marker {color: var(--accent-color-rose);}
      .ingredients li::marker, ol li::marker {
        color: var(--accent-color-brown);
        font-weight: bold;
      }

Hope this helps.

Marked as helpful

1

@devkhrmnturk

Posted

@beowulf1958 Thank you for your time and feedback, I will play around with it more to keep it simple as you mentioned.

0

Please log in to post a comment

Log in with GitHub
Discord logo

Join our Discord community

Join thousands of Frontend Mentor community members taking the challenges, sharing resources, helping each other, and chatting about all things front-end!

Join our Discord