Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Templating based on block/element names? #50

Open
kizu opened this issue Nov 9, 2015 · 0 comments
Open

Templating based on block/element names? #50

kizu opened this issue Nov 9, 2015 · 0 comments

Comments

@kizu
Copy link
Owner

kizu commented Nov 9, 2015

Is it possible to add a way to declare templates based on block/elements' names and modifiers?

Jade already have a way to call mixins using an interpolation:

+#{'b'}.block
  +#{'e'}.element

Would this be enough to allow defining custom templates, so things like this:

mixin bemto_block()
  +b.block-wrapper
    +b.block
      +b.element
        block

+b.block
  = "Whatever"

would be treated as:

+b.block-wrapper
  +b.block
    +b.element
      = "Whatever"

One of the problems is how to stop it being recursive, when the +b.block can be used inside bemto_block mixin?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant