kizu / bemto

Smart mixins for writing BEM in Pug
439 stars 66 forks source link

Feature/context #61

Closed glebmachine closed 8 years ago

glebmachine commented 8 years ago

Added bemto_settings_context_replace option to disable automatic tag replacement on blocks with no tag provided

Test case included

kizu commented 8 years ago

This was partly implemented in 1.0.0, you can now set an individual tag's metadata. In future almost the same functionality as in this PR would be implemented as #66, in a way the tag's metadata could be changed using all the settings setters and the new +bemto_scope as well.

Right now, in 1.0.0, if setting the individual tag's metadata won't be enough for you, you could patch the bemto_tag_metadata object manually, like this:

- bemto_tag_metadata.a.content_type = 'block'

+b('a').link
  +e.element
  +e('a').element

Warning! this, though, undocumented feature and could be changed in future minor versions when the #66 would be implemented.

glebmachine commented 8 years ago

Ok, got it, thank you)