@@ -11,23 +11,39 @@ This creates:
1111` <h1 class="title"> `
1212
1313#### Block with modifiers (optional array allowing multiple modifiers):
14- ` <h1 {{ bem('title', ( ['small', 'red']) ) }}> `
14+ ` <h1 {{ bem('title', ['small', 'red']) }}> `
1515
1616This creates:
1717
1818` <h1 class="title title--small title--red"> `
1919
2020#### Element with modifiers and blockname (optional):
21- ` <h1 {{ bem('title', ( ['small', 'red']) , 'card') }}> `
21+ ` <h1 {{ bem('title', ['small', 'red'], 'card') }}> `
2222
2323This creates:
2424
2525` <h1 class="card__title card__title--small card__title--red"> `
2626
2727#### Element with modifiers, blockname and extra classes (optional - in case you need non-BEM classes):
2828
29- ` <h1 {{ bem('title', ( ['small', 'red']) , 'card', ( ['js-click', 'something-else']) ) }}> `
29+ ` <h1 {{ bem('title', ['small', 'red'], 'card', ['js-click', 'something-else']) }}> `
3030
3131This creates:
3232
3333` <h1 class="card__title card__title--small card__title--red js-click something-else"> `
34+
35+ #### Element with blockname, but no modifiers (optional):
36+
37+ ` <h1 {{ bem('title', '', 'card') }}> `
38+
39+ This creates:
40+
41+ ` <h1 class="card__title"> `
42+
43+ #### Element with extra classes only (optional):
44+
45+ ` <h1 {{ bem('title', '', '', ['js-click']) }}> `
46+
47+ This creates:
48+
49+ ` <h1 class="title js-click"> `
0 commit comments