These are chat archives for bem/talk

18th
Jul 2014
Egor A. Trubnikov-Panov
@egor-a-trubnikov-panov
Jul 18 2014 07:07
скажите как мен получить доступ к DOM того елемента по которому сработало событие click
this.liveBindTo("response", 'click', function ()
    {
      this.elem('input').val( "тут хочу вставить текст из элемента response, но как?" );
    });
Alexej Yaroshevich
@zxqfox
Jul 18 2014 08:25
this.liveBindTo("response", 'click', function (e) {
    e.target ?
Yelena Jetpyspayeva
@mursya
Jul 18 2014 09:47
@egor-a-trubnikov would be great to ask questions in English here, and if you use Russian, may be try to post in clubs.ya.ru/bem We try to keep a place where English language developers can ask questions, and this is it. If everyone will write in Russian, for sure few English language posts will sink in it ;( Thanks in advance
? from @ruslanzavacky: @bem_en why its bad to use .block__element.active, instead of modifier?)
? from @ruslanzavacky: @bem_en and can you suggest good implementations of bem? We are in decision to use bem for 30+ developers:) missing points in discussions :)
? from @shshaw: .@bem_en If I have a '.nav' block under a '.header' block to target, is it a modified '.nav--header' or a '.header__nav' element?
Sergey Berezhnoy
@veged
Jul 18 2014 09:58
@egor-a-trubnikov @zxqfox e.target or e.data.domElem for some early versions of i-bem.js
Sergey Berezhnoy
@veged
Jul 18 2014 10:04
@RuslanZavacky There is a lot of reasons. Mainly it's about possibility to mix many BEM-entities on one HTML-node, so with modifying state with such unspecific class as .active you catch ambiguity with which entity modification is .active exactly. Also such approach can damage possibility of parsing state of BEM-entity in JS — you can't separate modifications from mixed blocks (which have the same notation).
Egor A. Trubnikov-Panov
@egor-a-trubnikov-panov
Jul 18 2014 10:07
@zxqfox @veged @mursya Thanks.
@mursya Did not notice that the English only. Sorry
Yelena Jetpyspayeva
@mursya
Jul 18 2014 10:23
@egor-a-trubnikov its written on top of the page ;) thanks!!
@veged thanks! I tweet the answer to @ruslanzavacky
Yelena Jetpyspayeva
@mursya
Jul 18 2014 11:10
@veged ? from @shshaw: .@bem_en If I have a '.nav' block under a '.header' block to target, is it a modified '.nav--header' or a '.header__nav' element?
Yelena Jetpyspayeva
@mursya
Jul 18 2014 11:15
answer to @shshaw: To support encapsulation inner blocks should not know about parents. So it's better to use header__nav
Shaw
@shshaw
Jul 18 2014 16:16
Thanks for answering the question on Twitter and for the article on Smashing, @mursya. Does BEM have any sort of accommodations for relationships between blocks, or do all blocks have to be completely independent?