bem / bem-core

BEM Core Library
https://ru.bem.info/technologies/classic/i-bem/
Other
276 stars 95 forks source link

i-bem.bemhtml: Nested mixes work inconsistent for mods of same block #807

Closed tadatuta closed 8 years ago

tadatuta commented 9 years ago

bemjson:

{
    block: 'b1',
    mix: { block: 'b2' }
}

Case 1 bemhtml:

block('b2').mix()({ block: 'b3', mods: { m1: 'v1' } });

the result will have b3_m1_v1.

Case 2 bemhtml:

block('b2').mix()({ block: 'b1', mods: { m1: 'v1' } });

the result won't have b1_m1_v1.

veged commented 9 years ago

are you sure about your test cases? seems like any block('b2').mix()... doesn't work for { block: 'b1', mix: { block: 'b2' } }

tadatuta commented 9 years ago

@veged that's another issue which is filed here.

I wanted to show that when you try to mix same block with modifier in BEMHTML, the result is different from modifier of any other block.

veged commented 9 years ago

I just try to reproduce and fail with it. Could you please add tests to https://github.com/bem/bem-core/tree/v2/common.blocks/i-bem/i-bem.test.bemhtml ?

tadatuta commented 9 years ago

@veged I think you weren't able to reproduce because of this bug https://github.com/bem/bem-core/issues/873

veged commented 8 years ago

is it still relevant and not fixed in bem-xjst?

tadatuta commented 8 years ago

Closing in favour of https://github.com/bem/bem-xjst/issues/241