In the BEM documentation, they make reference to something called a "service block":
... In a case like this, instead of creating an element, you need to create a service block.
I can't find any mention of a service block. What does this actually mean?
@skube That's just a 'virtual' block which is not actually something really independent but serves the only reason — to split implementation into separate files.
For example consider block
menuwhich hasmenu__itemelements. Such elements may be quite complex so one may decide to create new block calledmenu-itemand split its implementation into different elements:menu-item__icon,menu-item__text, etc.Thanks for the quick reply!
Can you perhaps give a basic code example?
Something like this
Interesting. I guess I would have simply created nested elements:
Thanks!
You are right, that's just another way to solve the issue.