yuguang / fiddlesalad

An online playground with an instantly ready coding environment. Combine language preprocessors, CSS, HTML and JavaScript to create and share coding examples.
fiddlesalad.com
GNU General Public License v3.0
232 stars 80 forks source link

incorrect placement of parent selector (less) #36

Open elexisvenator opened 8 years ago

elexisvenator commented 8 years ago

Other less compilers i checked dont have this issue, it seems specific to the one fiddlesalad uses.

When i type:

.foo {
    > .bar {
        baz& {
            width: 50%;
        }
        baz & {
            width: 50%;
        }
        .baz& {
            width: 50%;
        }
        .baz & {
            width: 50%;
        }
    }
}

the expected output is

baz.foo > .bar {
  width: 50%;
}
baz .foo > .bar {
  width: 50%;
}
.baz.foo > .bar {
  width: 50%;
}
.baz .foo > .bar {
  width: 50%;
}

Instead, the output is

baz .foo > .bar {
  width: 50%;
}
baz .foo > .bar {
  width: 50%;
}
.baz .foo > .bar {
  width: 50%;
}
.baz .foo > .bar {
  width: 50%;
}