nex3/sass — Issue #214: @extend prints styles in the order that the extended are originally declared
Author: bdimcheff
Created: 2011-11-19 05:07:47+00:00
State: open

This might be the expected behavior for @extend, but it seems odd to me. I'd be willing to take a shot at fixing it if it would be welcome. Check it out:

.class-one
color: red
font-size: 8px

.class-two
color: lime

.merged
@extend .class-two
@extend .class-one

Turns into:

.class-one, .merged {
color: red;
font-size: 8px; }

.class-two, .merged {
color: lime; }

That means that, even though I extend `.class-one` *after* `.class-two`, the style for `.class-one` gets written out before `.class-two`, so the cascade order is not what I expect. I'd expect something with `.merged` to be red, but it's green instead. Am I crazy?