Design comparison
Solution retrospective
Hello, Frontend Mentor Community. Please give me some feedback on this challenge, It's hard for me to think a proper class name. can anyone please give me suggestion to improve my nameing class skills. Thanks.
Community feedback
- @vanzasetiaPosted about 2 years ago
Hi, Uday! 👋
It looks like you are using the BEM (Block Element Modifier) methodology as your class naming convention.
order__price--plan
is a valid BEM however, it is not used to be a child element. It's used as a modifier.For example, let's say you have a
button
class. Then, to modify the size of the button, you use the modifier class such asbutton--large
. That's how the modifier class works.I recommend making a
card
block instead oforder
. Then, make all elements inside the card as the elements of the card (card__heading
,card__button
). For the modifier, you might want to trycard__button--block
to make the button fill the entire width (e.g. "Proceed to payment" button).One suggestion I have is to not wrap the
img
withpicture
element.picture
element is used to offer different versions of the image. For example, you can usepicture
element when there are three images for different devices (e.g. mobile, tablet, desktop).I hope this helps! Happy coding!
Marked as helpful1
Please log in to post a comment
Log in with GitHubJoin 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