@elaineleung
Posted
Hi Lucas, well done for your first challenge! To shift the numbers, maybe you can try adding a padding-top: 1px
(or whatever value works for you) to your .ratings__rating
selector.
Regarding BEM, it feels like people all do things a little differently depending on what suits them best. For me, I normally try to keep things short and readable, and I try to avoid repetition just for better readability. For instance, since there's only one component here, I'd probably just use component
instead of rating-component
, and then the children would be component__icon
, component__title
, component__ratings
, etc. For the ratings, I might either use component__ratings-num
or ratings__num
. What helped me when I first started learning BEM was videos/tutorials from Kevin Powell and Gary Simon. Even though I've been using other systems, I still use BEM for naming, and I think the more you use the system, you'll be able to adjust accordingly.
Once again, good job, and welcome to Frontend Mentor!
Marked as helpful