less.js icon indicating copy to clipboard operation
less.js copied to clipboard

I can't use two multiple CSS class as BEM modificator

Open Pestov opened this issue 12 years ago • 2 comments

.pluso {
    &--small {
        a {
            width: 20px;
            height: 20px;
        }
    }
    &__small.&__big {
        a {
            background-image: url('../images/pluso/Round/20/01.png');
        }
    }
}

ParseError: Unrecognised input

Why? And why if I use &__small.big than compile done successful?

Pestov avatar Mar 23 '14 16:03 Pestov

You have the redundant dot there (i.e. &__small.&__big would expand to .pluso__small..pluso__big). The dot should be followed by an identifier hence the error for .&.

seven-phases-max avatar Mar 23 '14 17:03 seven-phases-max

@seven-phases-max sorry for the inconvenience... it's so simple. thanks!

Pestov avatar Mar 23 '14 23:03 Pestov