So I've got this code I worked through a tutorial with.
It is: <div>Navbar__Link Navbar__Link-toggle</div>
My question is what the unscores represent? A break into a second classes. It's just a weird naming convention and feels very alien.
So I've got this code I worked through a tutorial with.
It is: <div>Navbar__Link Navbar__Link-toggle</div>
My question is what the unscores represent? A break into a second classes. It's just a weird naming convention and feels very alien.
The double underscores are a naming convention used in "Block Element Modifier" style CSS, used to define the sub-element of a block.
So, Link is a sub-element of Nav, etc.
see this answer :
this is done because some people might name their block like this main_nav which will create confusion with single underscore like this : main_nav_item