danielguillan / bem-constructor

A Sass library for building immutable and namespaced BEM CSS objects
MIT License
543 stars 32 forks source link

Hack constructor namespaces the wrong selector #5

Closed danielguillan closed 9 years ago

danielguillan commented 9 years ago

The hack namespace should be applied to the current constructed selector.

@include block('burger') {
    @include modifier('veggie') {
        @include element('extra-topping') {
            @include hack() {
                ingredient: bacon;
            }
        }
    }
}

Current output:

._o-burger--veggie .o-burger__extra-topping { ingredient: bacon; }

Expected output:

.o-burger--veggie ._o-burger__extra-topping { ingredient: bacon; }
danielguillan commented 9 years ago

Fixed in f9336df