geddski / csstyle

MOVED TO https://github.com/csstyle/csstyle a modern approach for crafting beautifully maintainable stylesheets
http://csstyle.io
Other
850 stars 34 forks source link

Additional nesting issue fixes #64

Open kevnk opened 8 years ago

kevnk commented 8 years ago

I was having additional issues to the ones described in issue #58 for the following:

<div class="Component">
    <div class="Component__ParentPart --ShowChild">
        <div class="Component__ChildPart">Show me when my parent has --ShowChild option</div>
    </div>  
</div>
@include component(Component) {
  @include part(ChildPart) {
    display: none;
  }
  @include part(ParentPart) {
    @include option(ShowChild) {
      @include part(ChildPart) {
        display: block;
      }
    }
  }
}

Before the committed changes, the above compiled to:

.Component__ChildPart {
  display: none; }

.Component__ParentPart.\--ShowChild__ChildPart {
  display: block; }

Now, after these committed changes, it compiles to:

.Component__ChildPart {
  display: none; }

.Component__ParentPart.\--ShowChild .Component__ChildPart {
  display: block; }
lnpbk commented 7 years ago

I'm still seeing this problem in v1.5.1. Is there a reason this PR can't be merged? It seems to solve the problem well