Nice article! BEM-naming really makes a lot of sense and makes your code more understandable.
<liclassName="navList__item--blue">I am blue!</li>
One thing, though. I may be mistaken, but as far as I know according to BEM methodology you shouldn't use modifier alone (without block or element class). So it should be something like:
<liclassName="navList__item navList__item--blue">I am blue!</li>
You're not wrong, the modifier is just the -- at then end of the name though. I just used simple class names for the purpose of demonstration. The listItems are still elements, just elements with a modifier.
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
Nice article! BEM-naming really makes a lot of sense and makes your code more understandable.
One thing, though. I may be mistaken, but as far as I know according to BEM methodology you shouldn't use modifier alone (without block or element class). So it should be something like:
You're not wrong, the modifier is just the -- at then end of the name though. I just used simple class names for the purpose of demonstration. The listItems are still elements, just elements with a modifier.