csstyle icon indicating copy to clipboard operation
csstyle copied to clipboard

Additional nesting issue fixes

Open kevnk opened this issue 9 years ago • 1 comments

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; }

kevnk avatar Jan 19 '16 14:01 kevnk

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

lnpbk avatar May 16 '17 12:05 lnpbk