Answer the question
In order to leave comments, you need to log in
How to organize HTML code after BEM?
Studying BEM on ru.bem.info/articles/start-with-project-stub
I came across
such feature of BEM that after editing index.bemhtml.js the code in index.html becomes unreadable at all.
Example:
<!DOCTYPE html><html class="ua_js_no"><head><meta http-equiv="X-UA-Compatible" content="IE=edge"/><meta charset="utf-8"/><title>Title of the page</title><script>(function(e,c){e[c]=e[c].replace(/(ua_js_)no/g,"$1yes");})(document.documentElement,"className");</script><meta name="description" content=""/><link rel="stylesheet" href="_index.css"/><link rel="shortcut icon" href="/favicon.ico"/></head><body class="page"><div class="head"><div class="layout"><div class="layout__left"><form action="http://yandex.ru/yandsearch"><span class="input i-bem" data-bem="{"input":{}}"><span class="input__box"><input class="input__control" name="text" value="Find"/></span></span><button class="button button__control i-bem" data-bem="{"button":{}}" role="button" type="submit">Search</button></form></div><div class="layout__right"><div class="logo"><a class="link link__control i-bem" data-bem="{"link":{}}" href="http://ru.bem.info"><img class="image" src="http://varya.me/online-shop-dummy/desktop.blocks/b-logo/b-logo.png"/><div class="link__slogan">A new way of thinking</div></a></div></div></div></div><div class="goods"></div><script src="_index.js"></script></body></html>
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question