csstyle
csstyle copied to clipboard
Additional nesting issue fixes
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; }
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