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

Nested Elements not supported #8

Open
Baldauf opened this issue Mar 28, 2016 · 1 comment
Open

Nested Elements not supported #8

Baldauf opened this issue Mar 28, 2016 · 1 comment

Comments

@Baldauf
Copy link

Baldauf commented Mar 28, 2016

Nested BEM elements don't seem to be supported.
In a html structure like this one:

<div class="list-item">
  <div class="list-item__label">
    <span class="list-item__label__lbl">Label 1</span>
    <div class="list-item__label__caption">Caption 1</div>
  </div>
</div>

I would expect to be able to access Label 1 using

@include B(list-item) {
  @include E(label) {
    @include E(lbl) {
       styles: here;
     }
  }
}

But the css will actually just output as .list-item__lbl{ styles: here; }

@runningskull
Copy link
Member

@Baldauf nested elements is a bad smell & BEM says you shouldn't do it, so Bemerald spits out a warning about it (which notes a workaround)

EDIT: but the real answer is to un-nest the elements

EDIT2: actually it should be dying on an error. Not sure why it's not

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

2 participants