Referencing Parent Selectors in Extends
GoogleCodeExporter opened this issue · comments
Google Code Exporter commented
What steps will reproduce the problem?
1. When using extends the parent selectors don't seem to be copied across
2. Using this code:
/* START SASS */
@mixin foo($bar, $baz) {
width: $bar;
& p {
height: $baz;
}
}
.foo {
@include foo(123px, 456px);
}
.bar {
@extend .foo;
}
.baz {
@extend .foo;
}
/* END SASS */
What is the expected output? What do you see instead?
This is what I would expect to see:
/* START GENERATED CSS */
.foo, .bar, .baz {
width: 123px;
}
.foo p, .bar p, .baz p {
height: 456px;
}
/* END GENERATED CSS */
This is what I see instead:
/* START GENERATED CSS */
.foo, .bar, .baz {
width: 123px;
}
.foo p {
height: 456px;
}
/* END GENERATED CSS */
The issues is that, in the generated CSS, only styles which don't reference the
parent selector are copied over.
What version of the product are you using? On what operating system?
phamlp version 2010-04-16 on Windows XP running WampDeveloper
Please provide any additional information below.
I first logged this bug over at https://github.com/nex3/haml/issues/367 to
check that it was not a Sass bug.
Thanks,
Dan
Original issue reported on code.google.com by panoram...@gmail.com
on 7 Apr 2011 at 4:51
Google Code Exporter commented
I can confirm this is a bug, The ruby version of Sass emits the expected CSS.
Original comment by chrisepp...@gmail.com
on 7 Apr 2011 at 5:57