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

Order summary component solution using HTML and CSS only

@novanAfnd

Desktop design screenshot for the Order summary component 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?

I'm proud to have learned about hover in CSS. In the future I will try more difficult challenges and maybe challenges that use JS.

What challenges did you encounter, and how did you overcome them?

I found a problem with the bem. When an html element is nested too deep. the naming became confusing so I made the naming bem by changing it a little according to my understanding.

What specific areas of your project would you like help with?

Please give me feedback for naming using bem when we have html code that is nested too deep.

Community feedback

@nuraf9607

Posted

While you did fairly well, there could be some improvements such as "plan__plan-description" Instead of doing this you could do "plan-description", and also "text__upper-text" you could do "plan-description__lower-text" which Is more descriptive and follows BEM rules.

Marked as helpful

1

@novanAfnd

Posted

@nuraf9607 Wow... thanks for the advice you gave. The advice you give makes sense. I read several blogs about BEM. But I'm confused about implementing the solution they provided into my code. For example I used code from BEM Grandchildren: How To Handle Deeply Nested Elements

They have code like this:

<div class=“nav”>
    <ul class=“nav__menu”>
        <li class=“nav__menu__item”>
            <a class=“nav__menu__item__link”>Home</a>
        </li> 
    </ul>
</div>

Then the solution they provide is to make it like this:

<div class=“nav”>
    <ul class=“nav__menu”>
        <li class=“nav__item”>
            <a class=“nav__link”>Home</a>
        </li> 
    </ul>
</div>

Then what about my code like this:

 <p class="plan-change__text">Change</p>

if I make it like this:

<p class="card__text">Change</p>

It might conflict with the "card__text" class element in the top row that I already have. So I am very grateful for the advice you gave. And sorry for my weak English.

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