@kkalvaa
Posted
Good updates, here are acouple thoughts on the new stuff:
1: Since this is the only thing on the page it is technically correct to use H1. However, this component would be a part of a page and as such the card title should probably be H2 or H3, depending on the page hierarchy. But again, it is technically correct on this single page to use H1.
2: A big point of BEM is to keep specificity as low as possible. Instead of ".card .card__avatar" (0 2 0) it should just be ".card__avatar" (0 1 0). The lower you keep specificity the easier it is to override it later. If you were to have a ".card__avatar--square" class, or --big/--small/etc., you would now have to also up the specificity to 0 2 0 in order to override ".card .card__avatar". This quickly leads to a specificity war and you'll find yourself overqualifying your selectors more than you need to. It doesn't matter too much in a css-file of this size, but it does matter when you scale up, especially when you add more people to a project. In my experience almost all problems in css is a direct result of specificity problems.
Marked as helpful