Closed roryashfordbentley closed 9 years ago
I recently encountered a situation where I needed to add a modifier to the BEM menu <ul> but the modifier did not need to be added to children.
<ul>
an example:
<ul class="main-menu main-menu--secondary"> <li class="main-menu__item"><a href="#">Page 1</a></li> <li class="main-menu__item"><a href="#">Page 2</a></li> <li class="main-menu__item"><a href="#">Page 3</a></li> </ul>
I propose adding an implementation along these lines:
<?php bem_menu( 'my_menu', 'main-menu', array('main-men--secondary','main-menu--something-else') ) ?>
I think that having the last argument accept an array allows for a lot more flexibility but it keeps the code really lean.
Should the last argument accept a string as well as an array?
I recently encountered a situation where I needed to add a modifier to the BEM menu
<ul>
but the modifier did not need to be added to children.an example:
I propose adding an implementation along these lines:
I think that having the last argument accept an array allows for a lot more flexibility but it keeps the code really lean.