Skip to content

Additional nesting issue fixes - #64

Open
kevnk wants to merge 1 commit into
geddski:masterfrom
kevnk:patch-1
Open

Additional nesting issue fixes#64
kevnk wants to merge 1 commit into
geddski:masterfrom
kevnk:patch-1

Conversation

@kevnk

@kevnk kevnk commented Jan 19, 2016

Copy link
Copy Markdown

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 referenced this pull request in kevnk/csstyle Jan 19, 2016
I was having additional issues to the ones described in issue geddski#58 for the following:

```html
<div class="Component">
    <div class="Component__ParentPart --ShowChild">
        <div class="Component__ChildPart">Show me when my parent has --ShowChild option</div>
    </div>  
</div>
```

```scss
@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:

```css
.Component__ChildPart {
  display: none; }

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

Now, after these committed changes, it compiles to:

```css
.Component__ChildPart {
  display: none; }

.Component__ParentPart.\--ShowChild .Component__ChildPart {
  display: block; }
```
@lnpbk

lnpbk commented May 16, 2017

Copy link
Copy Markdown

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

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

Successfully merging this pull request may close these issues.

2 participants