{"id":289074,"date":"2018-09-06T20:30:02","date_gmt":"2018-09-06T16:30:02","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=289074"},"modified":"-0001-11-30T00:00:00","modified_gmt":"2018-09-06T16:30:02","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=289074","title":{"rendered":"BEM&#8217;a \u043d\u0435 \u0434\u043e\u043b\u0436\u043d\u043e \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u043e\u0432\u0430\u0442\u044c"},"content":{"rendered":"\n<div data-io-article-url=\"https:\/\/habr.com\/post\/422537\/\" class=\"post__text post__text-html js-mediator-article\">\n<div style=\"text-align:center;\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/mo\/8b\/kq\/mo8bkqqcnrfp9bokusxs3w6umdq.gif\" \/><\/div>\n<p>  \u0417\u0434\u0440\u0430\u0432\u0441\u0442\u0432\u0443\u0439\u0442\u0435.<\/p>\n<p>  BEM&#8217;\u0430 \u043d\u0435 \u0434\u043e\u043b\u0436\u043d\u043e \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u043e\u0432\u0430\u0442\u044c. \u0415\u0441\u0442\u044c \u043e\u0433\u0440\u043e\u043c\u043d\u043e\u0435 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u043f\u0440\u0438\u0447\u0438\u043d \u043d\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u044d\u0442\u0443 \u043c\u0435\u0442\u043e\u0434\u043e\u043b\u043e\u0433\u0438\u044e, \u043d\u043e \u0438\u0437-\u0437\u0430 \u0435\u0451 \u043f\u0440\u043e\u0441\u0442\u043e\u0442\u044b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f \u0438 \u043d\u0435\u043f\u043e\u043d\u0438\u043c\u0430\u043d\u0438\u044f \u0440\u0430\u0431\u043e\u0442\u044b CSS \u0438 HTML, \u043c\u0435\u0442\u043e\u0434\u043e\u043b\u043e\u0433\u0438\u044f \u0448\u0438\u0440\u043e\u043a\u043e \u0440\u0430\u0441\u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u0438\u043b\u0430\u0441\u044c \u0441\u0440\u0435\u0434\u0438 \u0444\u0440\u043e\u043d\u0442\u0435\u043d\u0434\u0435\u0440\u043e\u0432 \u0432\u0441\u0435\u0433\u043e \u043c\u0438\u0440\u0430, \u0432 \u0431\u043e\u043b\u044c\u0448\u0438\u043d\u0441\u0442\u0432\u0435 \u0441\u043b\u0443\u0447\u0430\u0435\u0432 \u0441\u0440\u0435\u0434\u0438 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u043e\u0432 \u0421\u041d\u0413. \u0418\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f BEM \u0441\u0435\u0439\u0447\u0430\u0441 \u043a\u0430\u043a \u043d\u0430 \u0431\u043e\u043b\u044c\u0448\u0438\u0445 \u0440\u0443\u0441\u0441\u043a\u043e\u044f\u0437\u044b\u0447\u043d\u044b\u0445 \u043f\u0440\u043e\u0435\u043a\u0442\u0430\u0445 (Yandex, Habr), \u0442\u0430\u043a \u0438 \u0432 \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u0444\u0440\u0435\u0439\u043c\u0432\u043e\u0440\u043a\u0430\u0445 (<a href=\"https:\/\/react-md.mlaursen.com\/\">react-md<\/a>). \u0412 \u044d\u0442\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0435 \u043f\u043e\u0439\u0434\u0451\u0442 \u043f\u043e\u0434\u0440\u043e\u0431\u043d\u044b\u0439 \u0440\u0430\u0437\u0431\u043e\u0440 \u043f\u043b\u044e\u0441\u043e\u0432 \u0438 \u043c\u0438\u043d\u0443\u0441\u043e\u0432 \u044d\u0442\u043e\u0433\u043e \u043f\u043e\u0434\u0445\u043e\u0434\u0430 \u043a \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0435. \u0412\u0441\u0435 \u043f\u0440\u0438\u043c\u0435\u0440\u044b \u0432\u0451\u0440\u0441\u0442\u043a\u0438 \u0431\u0443\u0434\u0443\u0442 \u0432\u0437\u044f\u0442\u044b \u0441 \u043e\u0444\u0438\u0446\u0438\u0430\u043b\u044c\u043d\u043e\u0433\u043e \u0441\u0430\u0439\u0442\u0430 <a href=\"https:\/\/en.bem.info\/methodology\/quick-start\/\">BEM<\/a>.<br \/>  <a name=\"habracut\"><\/a><br \/>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/kj\/wn\/au\/kjwnauugv8k8megcfjufizujk8c.jpeg\"\/><\/p>\n<p>  \u0410\u0431\u0431\u0440\u0435\u0432\u0438\u0430\u0442\u0443\u0440\u0430 BEM \u2014 \u0431\u043b\u043e\u043a\/\u044d\u043b\u0435\u043c\u0435\u043d\u0442\/\u043c\u043e\u0434\u0438\u0444\u0438\u043a\u0430\u0442\u043e\u0440. \u041b\u044e\u0431\u043e\u0439 \u043c\u0430\u043a\u0435\u0442 \u0438\u043b\u0438 \u0434\u0438\u0437\u0430\u0439\u043d \u043c\u043e\u0436\u043d\u043e \u0432\u0438\u0437\u0443\u0430\u043b\u044c\u043d\u043e \u0440\u0430\u0437\u0431\u0438\u0442\u044c \u043d\u0430 \u0431\u043b\u043e\u043a\u0438, \u043a \u043f\u0440\u0438\u043c\u0435\u0440\u0443 \u2014 <u>sidebar<\/u> \u0441\u0430\u0439\u0442\u0430. \u0412 \u043a\u0430\u0436\u0434\u043e\u043c \u0431\u043b\u043e\u043a\u0435 \u043c\u043e\u0433\u0443\u0442 \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u0442\u044c\u0441\u044f \u043e\u0434\u0438\u043d \u0438\u043b\u0438 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u043e\u0432. \u0423 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u043e\u0432 \u043c\u043e\u0433\u0443\u0442 \u0431\u044b\u0442\u044c \u043c\u043e\u0434\u0438\u0444\u0438\u043a\u0430\u0442\u043e\u0440\u044b \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u044f (active, disabled), \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0435 \u043a\u043b\u0430\u0441\u0441\u044b \u0434\u043b\u044f \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f \u0433\u0440\u0430\u043d\u0438\u0446, \u0448\u0438\u0440\u0438\u043d\u044b, \u0446\u0432\u0435\u0442\u0430 \u0444\u043e\u043d\u0430 \u0438 \u0442.\u0434.<\/p>\n<p>  \u0418\u0434\u0435\u044f \u0440\u0430\u0437\u0431\u0438\u0442\u0438\u044f \u043c\u0430\u043a\u0435\u0442\u0430 \u043d\u0430 \u0431\u043b\u043e\u043a\u0438 \u043d\u0435 \u043d\u043e\u0432\u0430\u044f, \u0447\u0442\u043e \u043d\u0430\u043c \u043f\u0440\u0435\u0434\u043b\u0430\u0433\u0430\u0435\u0442 BEM \u2014 \u0443\u0434\u043b\u0438\u043d\u044f\u0442\u044c \u0438\u043c\u0435\u043d\u0430 \u043a\u043b\u0430\u0441\u0441\u043e\u0432, \u0432\u0441\u0435\u0433\u0434\u0430 \u0434\u0435\u043b\u0430\u0442\u044c \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u044b \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u044b\u043c\u0438 \u043e\u0442 \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u044f \u0431\u043b\u043e\u043a\u0430 \u0438 \u0437\u0430\u0434\u0430\u0432\u0430\u0442\u044c \u043b\u044e\u0431\u043e\u0439 \u043a\u043b\u0430\u0441\u0441 \u0433\u043b\u043e\u0431\u0430\u043b\u044c\u043d\u043e. \u041f\u043e\u043c\u043e\u0433\u0430\u0435\u0442 \u044d\u0442\u043e \u0431\u0443\u043a\u0432\u0430\u043b\u044c\u043d\u043e \u043d\u0438\u0433\u0434\u0435 \u0438 \u043f\u0440\u0438\u0432\u043e\u0434\u0438\u0442 \u043a \u043f\u0435\u0447\u0430\u043b\u044c\u043d\u044b\u043c \u043f\u043e\u0441\u043b\u0435\u0434\u0441\u0442\u0432\u0438\u044f\u043c\u0438 \u0432 \u0432\u0451\u0440\u0441\u0442\u043a\u0435 \u043f\u0440\u043e\u0435\u043a\u0442\u043e\u0432. \u041d\u0438\u0436\u0435 \u043e\u043f\u0438\u0441\u0430\u043d\u044b \u043f\u043e \u043f\u0443\u043d\u043a\u0442\u0430\u043c \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u044b \u0432 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0438 BEM&#8217;a:<\/p>\n<h3>\u041d\u0435\u0447\u0438\u0442\u0430\u0431\u0435\u043b\u044c\u043d\u044b\u0439 html<\/h3>\n<p>  \u042d\u0442\u043e \u0432\u0451\u0440\u0441\u0442\u043a\u0430 \u0441 \u043e\u0444\u0438\u0446\u0438\u0430\u043b\u044c\u043d\u043e\u0433\u043e \u0441\u0430\u0439\u0442\u0430 <a href=\"https:\/\/ru.bem.info\/methodology\/quick-start\/\">BEM<\/a>. \u0423\u0434\u043b\u0438\u043d\u0451\u043d\u043d\u044b\u0435 \u0438 php-\u043f\u043e\u0434\u043e\u0431\u043d\u044b\u0435 \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u044f CSS \u043a\u043b\u0430\u0441\u0441\u043e\u0432 \u0434\u0435\u043b\u0430\u0435\u0442 \u043b\u044e\u0431\u0443\u044e \u0432\u0451\u0440\u0441\u0442\u043a\u0443 \u0430\u0431\u0441\u043e\u043b\u044e\u0442\u043d\u043e \u043d\u0435\u0447\u0438\u0442\u0430\u0431\u0435\u043b\u044c\u043d\u043e\u0439 \u0432\u043f\u0435\u0440\u0435\u043c\u0435\u0436\u043a\u0443 \u0441 \u0430\u0442\u0440\u0438\u0431\u0443\u0442\u0430\u043c\u0438:<\/p>\n<pre><code>&lt;ul class=&quot;article-rewind article-rewind_type_static article-rewind_lang_ru&quot;&gt;     &lt;li class=&quot;article-rewind__next&quot;&gt;         &lt;div class=&quot;article-rewind__next-text&quot;&gt;\u0427\u0438\u0442\u0430\u0442\u044c \u0434\u0430\u043b\u0435\u0435&lt;\/div&gt;         &lt;a class=&quot;article-rewind__next-link&quot; href=&quot;&quot;&gt;\u041e\u0441\u043d\u043e\u0432\u043d\u044b\u0435 \u043f\u043e\u043d\u044f\u0442\u0438\u044f&lt;\/a&gt;    &lt;\/li&gt; &lt;\/ul&gt; <\/code><\/pre>\n<p>  \u041d\u0438\u0436\u0435 \u043f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u043b\u0435\u043d \u043e\u0431\u0440\u0430\u0437\u0435\u0446 \u0432\u0451\u0440\u0441\u0442\u043a\u0438 \u0431\u0435\u0437 \u043d\u0430\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u043d\u0438\u044f \u0432 \u0438\u043c\u0435\u043d\u0438 \u043a\u043b\u0430\u0441\u0441\u0430 \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u044f \u0431\u043b\u043e\u043a\u0430, \u043c\u043e\u0434\u0438\u0444\u0438\u043a\u0430\u0442\u043e\u0440\u044b \u043f\u0440\u0438\u0432\u044f\u0437\u044b\u0432\u0430\u044e\u0442\u0441\u044f \u043a \u0433\u043b\u0430\u0432\u043d\u043e\u043c\u0443 \u043a\u043b\u0430\u0441\u0441\u0443 \u0447\u0435\u0440\u0435\u0437 \u043d\u0430\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u043d\u0438\u0435 \u0432 SCSS, \u0430 \u043d\u0435 \u0442\u0435\u043a\u0441\u0442\u043e\u0432\u043e\u0435 \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u0435 \u043a\u043b\u0430\u0441\u0441\u0430:<\/p>\n<pre><code>&lt;ul class=&quot;article-rewind type-static lang-ru&quot;&gt;     &lt;li class=&quot;next&quot;&gt;         &lt;div class=&quot;text&quot;&gt;\u0427\u0438\u0442\u0430\u0442\u044c \u0434\u0430\u043b\u0435\u0435&lt;\/div&gt;         &lt;a class=&quot;link&quot; href=&quot;&quot;&gt;\u041e\u0441\u043d\u043e\u0432\u043d\u044b\u0435 \u043f\u043e\u043d\u044f\u0442\u0438\u044f&lt;\/a&gt;    &lt;\/li&gt; &lt;\/ul&gt; <\/code><\/pre>\n<p>  <\/p>\n<pre><code>.article-rewind {   margin:      0;   padding:     0;   list-style:  none;   &.type-static {     position:  relative;     display:   flex;   }   &.lang-en {}   &.lang-ru {}   &.lang-uk {}   & &gt; .next {     position:      relative;     flex-grow:     1;     align-self:    center;     margin-right:  88px;     text-align:    right;     .text {       font-size:   16px;       position:    absolute;       right:       0;       margin-top: -32px;     }     .link {       font-size:   40px;       line-height: 46px;     }   } } <\/code><\/pre>\n<h3>\u0421\u043b\u043e\u0436\u043d\u043e\u0441\u0442\u0438 \u0441 \u043d\u0430\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u043d\u0438\u044f\u043c\u0438 \u043c\u043e\u0434\u0438\u0444\u0438\u043a\u0430\u0442\u043e\u0440\u043e\u0432<\/h3>\n<p>  \u041b\u044e\u0431\u043e\u0439 \u043a\u043b\u0430\u0441\u0441 \u0432 BEM \u2014 \u0433\u043b\u043e\u0431\u0430\u043b\u044c\u043d\u044b\u0439, \u0438 \u043c\u043e\u0434\u0438\u0444\u0438\u043a\u0430\u0442\u043e\u0440\u044b \u2014 \u043d\u0435 \u0438\u0441\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435. \u0422\u0430\u043c, \u0433\u0434\u0435 CSS \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u043e\u0441\u043d\u043e\u0432\u043d\u043e\u043c\u0443 \u043a\u043b\u0430\u0441\u0441\u0443, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, <b>button<\/b> \u043d\u0430\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u044c \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u043a\u043b\u0430\u0441\u0441\u043e\u0432 <b>active, disabled, error<\/b>, \u0432\u044b \u0431\u0443\u0434\u0435\u0442\u0435 \u0437\u0430\u0434\u0430\u0432\u0430\u0442\u044c \u0432\u0441\u0451 \u044d\u0442\u043e \u0433\u043b\u043e\u0431\u0430\u043b\u044c\u043d\u043e, \u043d\u0430\u0441\u043b\u0435\u0434\u0443\u044f \u0432 \u0438\u043c\u0435\u043d\u0438 \u0440\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u0441\u043a\u0438\u0435 \u0438\u043c\u0435\u043d\u0430 \u0431\u043b\u043e\u043a\u043e\u0432 \u0438 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u043e\u0432. \u0422\u0430\u043a\u043e\u0439 \u043f\u043e\u0434\u0445\u043e\u0434 \u2014 \u0438\u0433\u043d\u043e\u0440\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u0435\u0439 CSS \u043a\u0430\u043a \u0432\u043b\u043e\u0436\u0435\u043d\u043d\u043e\u0441\u0442\u044c \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u043e\u0432 \u0432 \u043a\u043b\u0430\u0441\u0441 \u0438 \u0443\u0434\u043b\u0438\u043d\u0435\u043d\u0438\u0435 \u0438\u043c\u0451\u043d \u043d\u0430 \u0440\u043e\u0432\u043d\u043e\u043c \u043c\u0435\u0441\u0442\u0435:<\/p>\n<pre><code>    &lt;h1 class=&quot;article__heading_level_1 article__heading_level_1_active&quot;&gt;&lt;\/h1&gt; <\/code><\/pre>\n<p>   \u041f\u0440\u0438\u043c\u0435\u0440 \u043d\u0430\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u043d\u0438\u044f \u043c\u043e\u0434\u0438\u0444\u0438\u043a\u0430\u0442\u043e\u0440\u043e\u0432 \u0447\u0435\u0440\u0435\u0437 SCSS, \u0430 \u043d\u0435 \u0447\u0435\u0440\u0435\u0437 \u0441\u043b\u043e\u0432\u0430 \u0432 \u0438\u043c\u0435\u043d\u0438 \u043a\u043b\u0430\u0441\u0441\u0430:<\/p>\n<pre><code>    &lt;h1 class=&quot;heading active&quot;&gt;&lt;\/h1&gt; <\/code><\/pre>\n<p>  <\/p>\n<pre><code>.article {   h1.heading {     font-size:   50px;     line-height: 64px;     float:       left;     &.active {       color:     #ccc;     }   } } <\/code><\/pre>\n<p>  <\/p>\n<h3>\u0412\u0441\u0435 \u043a\u043b\u0430\u0441\u0441\u044b \u2014 \u043f\u0441\u0435\u0432\u0434\u043e-\u0433\u043b\u043e\u0431\u0430\u043b\u044c\u043d\u044b\u0435<\/h3>\n<p>  \u041f\u043e \u0441\u0443\u0442\u0438, \u0432 \u0433\u043b\u043e\u0431\u0430\u043b\u044c\u043d\u044b\u0445 \u043a\u043b\u0430\u0441\u0441\u0430\u0445 \u043d\u0435\u0442 \u043d\u0438\u0447\u0435\u0433\u043e \u043f\u043b\u043e\u0445\u043e\u0433\u043e. \u041f\u0440\u043e\u0431\u043b\u0435\u043c\u0430 \u0432 \u0442\u043e\u043c, \u0447\u0442\u043e \u0432 \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u0438 \u043a\u043b\u0430\u0441\u0441\u0430 \u0441\u043e\u0445\u0440\u0430\u043d\u044f\u0435\u0442\u0441\u044f \u0438\u043c\u044f \u0431\u043b\u043e\u043a\u0430 \u0438\u043b\u0438 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u0430 \u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0435\u0433\u043e \u0432\u043d\u0435 \u0431\u043b\u043e\u043a\u0430 \u0443\u0436\u0435 \u043d\u0435\u043b\u044c\u0437\u044f \u0438 \u0433\u043b\u043e\u0431\u0430\u043b\u044c\u043d\u043e\u0441\u0442\u044c \u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u0441\u044f \u0431\u0435\u0441\u043f\u043e\u043b\u0435\u0437\u043d\u043e\u0439. \u041f\u043b\u044e\u0441 \u043a\u043e \u0432\u0441\u0435\u043c\u0443 \u0432 \u0431\u0440\u0430\u0443\u0437\u0435\u0440\u0435 \u0432\u0438\u0441\u044f\u0442 \u0433\u043b\u043e\u0431\u0430\u043b\u044c\u043d\u044b\u0435 \u043a\u043b\u0430\u0441\u0441\u044b, \u043a \u043f\u0440\u0438\u043c\u0435\u0440\u0443 <u>promo-section_color_white<\/u> \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0432\u0441\u0451 \u0447\u0442\u043e \u0434\u0435\u043b\u0430\u0435\u0442 \u2014 \u043c\u0435\u043d\u044f\u0435\u0442 \u0446\u0432\u0435\u0442 \u0444\u043e\u043d\u0430 \u043d\u0430 \u0431\u0435\u043b\u044b\u0439, \u043f\u0440\u0438\u0447\u0451\u043c \u043f\u0440\u0438\u043c\u0435\u043d\u0438\u0442\u044c \u044d\u0442\u043e \u043c\u043e\u0436\u043d\u043e \u0442\u043e\u043b\u044c\u043a\u043e \u043a \u0431\u043b\u043e\u043a\u0443 <u>.promo-section<\/u>. \u0414\u043b\u044f \u0434\u0440\u0443\u0433\u0438\u0445 \u0431\u043b\u043e\u043a\u043e\u0432 \u0441 \u0431\u0435\u043b\u044b\u043c \u0444\u043e\u043d\u043e\u043c \u0434\u0435\u043b\u0430\u0439\u0442\u0435 \u043d\u043e\u0432\u044b\u0439 \u043a\u043b\u0430\u0441\u0441 \u0441 \u0445\u0430\u0440\u0434\u043a\u043e\u0434\u043e\u043c \u0432 \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u0438. \u042d\u043b\u0435\u043c\u0435\u043d\u0442\u044b \u043d\u0435 \u043c\u043e\u0433\u0443\u0442 \u0431\u044b\u0442\u044c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u044b \u0432\u0435\u0437\u0434\u0435 \u0432 \u043f\u0440\u043e\u0435\u043a\u0442\u0435, \u0445\u043e\u0442\u044f \u0438 \u043f\u0440\u0438\u043c\u0435\u043d\u044f\u0442\u044c \u043a\u043b\u0430\u0441\u0441\u044b \u0442\u0435\u0445\u043d\u0438\u0447\u0435\u0441\u043a\u0438 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e \u0432\u0435\u0437\u0434\u0435:<\/p>\n<pre><code>  &lt;div class=&quot;promo-section promo-section_color_white&quot;&gt;&lt;\/div&gt; <\/code><\/pre>\n<p>  \u0412\u043c\u0435\u0441\u0442\u043e \u043f\u0440\u0438\u0432\u044f\u0437\u043a\u0438 \u043a \u0431\u043b\u043e\u043a\u0443 \u0447\u0435\u0440\u0435\u0437 \u0442\u0435\u043a\u0441\u0442 \u0432 html, \u043c\u043e\u0436\u043d\u043e \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u043a\u043b\u0430\u0441\u0441\u044b \u043f\u043e-\u043d\u0430\u0441\u0442\u043e\u044f\u0449\u0435\u043c\u0443 \u0433\u043b\u043e\u0431\u0430\u043b\u044c\u043d\u044b\u043c, \u043f\u0435\u0440\u0435\u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u043d\u0430 \u0434\u0440\u0443\u0433\u0438\u0445 \u0441\u0435\u043a\u0446\u0438\u044f\u0445 \u0438 \u0430\u0431\u0441\u043e\u043b\u044e\u0442\u043d\u043e \u043d\u0438\u0447\u0435\u0433\u043e \u043d\u0435 \u043f\u043e\u0442\u0435\u0440\u044f\u0442\u044c:<\/p>\n<pre><code>  &lt;div class=&quot;promo-section background-white&quot;&gt;&lt;\/div&gt; <\/code><\/pre>\n<p>  <\/p>\n<pre><code>.promo-section {   position: relative;   padding:  0 0 70px; } .background-white {   background-color: white; } <\/code><\/pre>\n<p>  <\/p>\n<h3>\u0417\u0430\u043f\u0440\u0435\u0449\u0435\u043d\u0438\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f \u0441\u0435\u043c\u0430\u043d\u0442\u0438\u043a\u0438<\/h3>\n<p>  \u0414\u043e\u0441\u043b\u043e\u0432\u043d\u0430\u044f \u0446\u0438\u0442\u0430\u0442\u0430 \u0438\u0437 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u0438:   <\/p>\n<blockquote><p>\u0412 CSS \u043f\u043e \u0411\u042d\u041c \u0442\u0430\u043a\u0436\u0435 \u043d\u0435 \u0440\u0435\u043a\u043e\u043c\u0435\u043d\u0434\u0443\u0435\u0442\u0441\u044f \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0441\u0435\u043b\u0435\u043a\u0442\u043e\u0440\u044b \u043f\u043e \u0442\u0435\u0433\u0430\u043c \u0438\u043b\u0438 id<\/p><\/blockquote>\n<p> \u0412 \u043c\u0435\u0441\u0442\u0430\u0445, \u0433\u0434\u0435 \u043c\u043e\u0436\u043d\u043e \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e mixin&#8217;a \u0438\u043b\u0438 \u0446\u0438\u043a\u043b\u0430 \u0432 \u043f\u0440\u0435\u043f\u0440\u043e\u0446\u0435\u0441\u0441\u043e\u0440\u0435 \u0432\u043e\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c\u0441\u044f \u043d\u0430\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u043d\u0438\u0435\u043c \u0447\u0435\u0440\u0435\u0437 html-\u0442\u0435\u0433 \u0432\u044b \u043d\u0435 \u043c\u043e\u0436\u0435\u0442\u0435 \u044d\u0442\u043e\u0433\u043e \u0434\u0435\u043b\u0430\u0442\u044c:<\/p>\n<pre><code>  &lt;h1 class=&quot;article__heading article__heading_level_1&quot;&gt;&lt;\/h1&gt;   &lt;h2 class=&quot;article__heading article__heading_level_2&quot;&gt;&lt;\/h2&gt;   &lt;h3 class=&quot;article__heading article__heading_level_2&quot;&gt;&lt;\/h3&gt; <\/code><\/pre>\n<p>  \u0417\u0434\u0435\u0441\u044c \u0441\u0442\u0438\u043b\u0438 \u043c\u043e\u0436\u043d\u043e \u0431\u044b\u043b\u043e \u0437\u0430\u0434\u0430\u0442\u044c \u0447\u0435\u0440\u0435\u0437 h1,h2 \u0438 \u0442\u0430\u043a \u0434\u0430\u043b\u0435\u0435, \u043d\u043e \u0442\u0435\u043f\u0435\u0440\u044c \u0432\u043c\u0435\u0441\u0442\u043e \u0441\u0441\u044b\u043b\u043a\u0438 \u043d\u0430 \u0442\u044d\u0433\u0438 \u043c\u044b \u0433\u043b\u043e\u0431\u0430\u043b\u044c\u043d\u043e \u0438\u043c\u0435\u0435\u043c \u0437\u0430\u0434\u0430\u043d\u043d\u044b\u0439 \u043a\u043b\u0430\u0441\u0441 \u00abarticle__heading_level_1\u00bb.<\/p>\n<pre><code>  &lt;h1 class=&quot;heading&quot;&gt;&lt;\/h1&gt;   &lt;h2 class=&quot;heading&quot;&gt;&lt;\/h2&gt;   &lt;h3 class=&quot;heading&quot;&gt;&lt;\/h3&gt; <\/code><\/pre>\n<p>  <\/p>\n<pre><code>@for $index from 1 through 6 {   h#{$index}.heading {     font-size: (42px \/ $index);   } }  \/* mixin output *\/ h1.heading {font-size: 42px;} h2.heading {font-size: 21px;} h3.heading {font-size: 14px;} h4.heading {font-size: 10.5px;} h5.heading {font-size: 8.4px;} h6.heading {font-size: 7px;} <\/code><\/pre>\n<p>  <\/p>\n<h3>\u041f\u043e\u0434\u0440\u0430\u0437\u0443\u043c\u0435\u0432\u0430\u0435\u0442 \u0432\u0451\u0440\u0441\u0442\u043a\u0443 <u>\u0442\u043e\u043b\u044c\u043a\u043e<\/u> \u0431\u043b\u043e\u043a\u0430\u043c\u0438<\/h3>\n<p>  \u0412 \u043a\u0430\u0436\u0434\u043e\u043c \u0431\u043e\u043b\u044c\u0448\u043e\u043c \u0442\u0435\u043c\u043f\u043b\u0435\u0439\u0442\u0435 \u0435\u0441\u0442\u044c \u043c\u0435\u043b\u043a\u0438\u0435 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u044b, \u043a\u0430\u043a \u043a\u043d\u043e\u043f\u043a\u0438, \u0434\u0440\u043e\u043f\u0434\u0430\u0443\u043d\u044b, \u0442\u0430\u0439\u0442\u043b\u044b, \u0441\u0443\u0431\u0442\u0430\u0439\u0442\u043b\u044b, \u0441\u0435\u043a\u0446\u0438\u0438 \u0438 \u0442.\u0434. \u041d\u043e \u0432 \u0411\u042d\u041c\u0435 \u0443 \u0432\u0430\u0441 \u0438\u0445 \u043d\u0435\u0442\u0443, \u0442\u0430\u043a \u043a\u0430\u043a \u043b\u044e\u0431\u043e\u0439 \u044d\u043b\u0435\u043c\u0435\u043d\u0442 \u0431\u0435\u0437 \u0431\u043b\u043e\u043a\u0430 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0442\u043e\u0436\u0435 \u0437\u0430\u043f\u0440\u0435\u0449\u0435\u043d\u043e.   <\/p>\n<blockquote><p>\u042d\u043b\u0435\u043c\u0435\u043d\u0442 \u2014 <b>\u0432\u0441\u0435\u0433\u0434\u0430 \u0447\u0430\u0441\u0442\u044c \u0431\u043b\u043e\u043a\u0430<\/b> \u0438 \u043d\u0435 \u0434\u043e\u043b\u0436\u0435\u043d \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c\u0441\u044f \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u043e \u043e\u0442 \u043d\u0435\u0433\u043e.<\/p><\/blockquote>\n<p> \u0425\u043e\u0442\u0438\u0442\u0435 \u0434\u0440\u043e\u043f\u0434\u0430\u0443\u043d \u043d\u0435 \u0442\u043e\u043b\u044c\u043a\u043e \u0432 \u0445\u044d\u0434\u0435\u0440\u0435? \u041d\u0430 \u0441\u0430\u0439\u0442\u0435 BEM&#8217;a \u0434\u0440\u043e\u043f\u0434\u0430\u0443\u043d \u0432 header&#8217;e \u0441\u0432\u0451\u0440\u0441\u0442\u0430\u043d \u043a\u0430\u043a \u043f\u043e\u043f\u0430\u043f, \u043b\u0435\u0436\u0430\u0449\u0438\u043c \u0432 \u043a\u043e\u0440\u043d\u0435 body. \u041f\u043e \u0441\u0443\u0442\u0438, \u044d\u0442\u043e\u0442 \u043f\u0443\u043d\u043a\u0442 \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0437\u0430\u043f\u0440\u0435\u0449\u0435\u043d\u0438\u0435\u043c \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u043f\u043e\u043b\u043d\u043e\u0446\u0435\u043d\u043d\u043e\u0433\u043e \u0442\u0435\u043c\u043f\u043b\u0435\u0439\u0442\u0430, \u0430 \u043d\u0435 \u0447\u0435\u0433\u043e-\u043d\u0438\u0431\u0443\u0434\u044c \u0441\u043b\u043e\u0436\u043d\u0435\u0435 \u043b\u044d\u043d\u0434\u0438\u043d\u0433\u0430.<\/p>\n<h3>\u041f\u043b\u044e\u0441\u044b<\/h3>\n<p>  \u0418\u0445 \u043d\u0435\u0442. \u0411\u042d\u041c \u0443\u043d\u0438\u0447\u0442\u043e\u0436\u0430\u0435\u0442 \u043f\u043e\u043d\u044f\u0442\u0438\u0435 \u0442\u0435\u043c\u043f\u043b\u0435\u0439\u0442\u0430, \u0437\u0430\u043f\u0440\u0435\u0449\u0430\u0435\u0442 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435 \u0444\u0443\u043d\u043a\u0446\u0438\u0439 CSS, \u043f\u043e\u0434\u0442\u0430\u043b\u043a\u0438\u0432\u0430\u0435\u0442 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0430 \u043a \u0445\u0430\u0440\u0434\u043a\u043e\u0434\u0443. \u0411\u0443\u0434\u0443 \u0440\u0430\u0434 \u043f\u043e\u0445\u0432\u0430\u043b\u0435 \u043c\u0435\u0442\u043e\u0434\u043e\u043b\u043e\u0433\u0438\u0438 \u0432 \u043a\u043e\u043c\u043c\u0435\u043d\u0442\u0430\u0440\u0438\u044f\u0445, \u0431\u0443\u0434\u0435\u0442 \u043f\u0438\u0449\u0430 \u0434\u043b\u044f \u0440\u0430\u0437\u043c\u044b\u0448\u043b\u0435\u043d\u0438\u0439.<\/div>\n<p>        <script class=\"js-mediator-script\">!function(e){function t(t,n){if(!(n in e)){for(var r,a=e.document,i=a.scripts,o=i.length;o--;)if(-1!==i[o].src.indexOf(t)){r=i[o];break}if(!r){r=a.createElement(\"script\"),r.type=\"text\/javascript\",r.async=!0,r.defer=!0,r.src=t,r.charset=\"UTF-8\";var d=function(){var e=a.getElementsByTagName(\"script\")[0];e.parentNode.insertBefore(r,e)};\"[object Opera]\"==e.opera?a.addEventListener?a.addEventListener(\"DOMContentLoaded\",d,!1):e.attachEvent(\"onload\",d):d()}}}t(\"\/\/mediator.mail.ru\/script\/2820404\/\",\"_mediator\")}(window);<\/script>     <br \/> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"https:\/\/habr.com\/post\/422537\/\"> https:\/\/habr.com\/post\/422537\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"\n<div data-io-article-url=\"https:\/\/habr.com\/post\/422537\/\" class=\"post__text post__text-html js-mediator-article\">\n<div style=\"text-align:center;\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/mo\/8b\/kq\/mo8bkqqcnrfp9bokusxs3w6umdq.gif\" \/><\/div>\n<p>  \u0417\u0434\u0440\u0430\u0432\u0441\u0442\u0432\u0443\u0439\u0442\u0435.<\/p>\n<p>  BEM&#8217;\u0430 \u043d\u0435 \u0434\u043e\u043b\u0436\u043d\u043e \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u043e\u0432\u0430\u0442\u044c. \u0415\u0441\u0442\u044c \u043e\u0433\u0440\u043e\u043c\u043d\u043e\u0435 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u043f\u0440\u0438\u0447\u0438\u043d \u043d\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u044d\u0442\u0443 \u043c\u0435\u0442\u043e\u0434\u043e\u043b\u043e\u0433\u0438\u044e, \u043d\u043e \u0438\u0437-\u0437\u0430 \u0435\u0451 \u043f\u0440\u043e\u0441\u0442\u043e\u0442\u044b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f \u0438 \u043d\u0435\u043f\u043e\u043d\u0438\u043c\u0430\u043d\u0438\u044f \u0440\u0430\u0431\u043e\u0442\u044b CSS \u0438 HTML, \u043c\u0435\u0442\u043e\u0434\u043e\u043b\u043e\u0433\u0438\u044f \u0448\u0438\u0440\u043e\u043a\u043e \u0440\u0430\u0441\u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u0438\u043b\u0430\u0441\u044c \u0441\u0440\u0435\u0434\u0438 \u0444\u0440\u043e\u043d\u0442\u0435\u043d\u0434\u0435\u0440\u043e\u0432 \u0432\u0441\u0435\u0433\u043e \u043c\u0438\u0440\u0430, \u0432 \u0431\u043e\u043b\u044c\u0448\u0438\u043d\u0441\u0442\u0432\u0435 \u0441\u043b\u0443\u0447\u0430\u0435\u0432 \u0441\u0440\u0435\u0434\u0438 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u043e\u0432 \u0421\u041d\u0413. \u0418\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f BEM \u0441\u0435\u0439\u0447\u0430\u0441 \u043a\u0430\u043a \u043d\u0430 \u0431\u043e\u043b\u044c\u0448\u0438\u0445 \u0440\u0443\u0441\u0441\u043a\u043e\u044f\u0437\u044b\u0447\u043d\u044b\u0445 \u043f\u0440\u043e\u0435\u043a\u0442\u0430\u0445 (Yandex, Habr), \u0442\u0430\u043a \u0438 \u0432 \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u0444\u0440\u0435\u0439\u043c\u0432\u043e\u0440\u043a\u0430\u0445 (<a href=\"https:\/\/react-md.mlaursen.com\/\">react-md<\/a>). \u0412 \u044d\u0442\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0435 \u043f\u043e\u0439\u0434\u0451\u0442 \u043f\u043e\u0434\u0440\u043e\u0431\u043d\u044b\u0439 \u0440\u0430\u0437\u0431\u043e\u0440 \u043f\u043b\u044e\u0441\u043e\u0432 \u0438 \u043c\u0438\u043d\u0443\u0441\u043e\u0432 \u044d\u0442\u043e\u0433\u043e \u043f\u043e\u0434\u0445\u043e\u0434\u0430 \u043a \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0435. \u0412\u0441\u0435 \u043f\u0440\u0438\u043c\u0435\u0440\u044b \u0432\u0451\u0440\u0441\u0442\u043a\u0438 \u0431\u0443\u0434\u0443\u0442 \u0432\u0437\u044f\u0442\u044b \u0441 \u043e\u0444\u0438\u0446\u0438\u0430\u043b\u044c\u043d\u043e\u0433\u043e \u0441\u0430\u0439\u0442\u0430 <a href=\"https:\/\/en.bem.info\/methodology\/quick-start\/\">BEM<\/a>.  <\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[],"tags":[],"class_list":["post-289074","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/289074","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=289074"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/289074\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=289074"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=289074"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=289074"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}