-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
What's a service block? #59
Comments
@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 |
Thanks for the quick reply! Can you perhaps give a basic code example? |
Something like this <ul class="menu">
<!-- each `li` should actually be `menu__item` but there won't be possibility to create its own elements in that case -->
<li class="menu-item">
<span class="menu-item__icon"></span>
<span class="menu-item__text">The first item</span>
<span class="menu-item__toggle"></span>
</li>
<li class="menu-item">
<span class="menu-item__icon"></span>
<span class="menu-item__text">The second item</span>
<span class="menu-item__toggle"></span>
</li>
</ul> |
Interesting. I guess I would have simply created nested elements: <ul class="menu">
<!-- Is this alternate approach wrong ? -->
<li class="menu__item">
<span class="menu__icon"></span>
<span class="menu__text">The first item</span>
<span class="menu__toggle"></span>
</li>
...
</ul> Thanks! |
You are right, that's just another way to solve the issue. |
In the BEM documentation, they make reference to something called a "service block":
I can't find any mention of a service block. What does this actually mean?
The text was updated successfully, but these errors were encountered: