In the first example, why set the class on the div rather than the button itself? #234
Unanswered
FrancisVila
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Here's the text:
In this case adding **.active** modifier to them would affect both....we need to ensure that a modifier would affect only the block it belongs to. Let's say that we have a menu item element and a button mixed together. In HTML this construction is represented by the following markup:
Why not add the active modifier to the button, something like:
That (as I see it) would have the advantage of differentiating between formatting specific to active buttons, specific to the menu__item block, and specific to active buttons within the menu__item block.
Further, I don't see why you would use class=button instead of just the button tag selector, but that's another question.
Beta Was this translation helpful? Give feedback.
All reactions