A
A
Andrei Popov2019-03-04 10:08:52
Pug
Andrei Popov, 2019-03-04 10:08:52

gulp pugbem plugin issues?

5c7cca5d62d24133226983.png
I started using the gulp pugbem plugin to reduce writing BEM classes in layout, I really liked the plugin until I ran into such problems.
Example 1. If a .header block is inserted via a pug mixin into a .page block, then the ._header block element will be compiled to htm like class="header _header", which should be class="header page__header"
Example 2. The .header block has the ._logo and ._menu elements, which will be compiled into class="header__logo" and class="header__menu". But if you insert a .wrap wrapper block, then the elements will not be compiled as intended, class="wrap__logo" and class="wrap__menu"
Are there any adequate solutions to these problems?
If not,
For example BemPug (a set of mixins), or are there the same problems?

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question