Closed qfox closed 8 years ago
I think we need just clarify difference for redefining between all modes and keep BEMXJST terms domain as thin as possible.
@veged Did you even read description? ;-)
@zxqfox formally yes — I try my best ;-)
read twice and still remain in conviction with my comment
so let's discuss it offline on nearest meeting
We have different merging with bemjson behaviour for
content
,tag
,cls
andattrs
modes.content
mode executes in anyway.tag
mode won't be executed if bemjson hadtag
property.attrs
&cls
from template will be merged withattrs
property in result.All of this forces users to use
.def
mode while using it much can significantly decrease performance.I guess we should make as many helpers as we can to reduce
.def
usage at all.The bright example is
.bydefault
helper that can hold the value for this mode by default (if property doesn't exist in users data).Template can look like:
And then we can redefine this easily with our current templates as well.
Also there are example with inconsistency between tag, content and attrs: sandbox example
/cc @veged @indutny