Ampersand conflict in LESS and SASS compilers -
i'm converting less sass , i'm getting error due block of code
.navbar{ &-inverse { .brand:hover { color: black; } } }
this piece of less causing me sass error:
invalid css after " &": expected "{", "-inverse {" "-inverse" may used @ beginning of compound selector.
in both languages,&
placeholder parent of current level of nesting (so in case .navbar
), problem , how can solve it?
in sass &
works child/parent/adjacent selector (space, >
, +
, ~
, ... ignored, if in front, or adds parent after selector) or add class (starting .
), id (starting #
) or pseudo-selector (starting :
).
the functionality want not implemented yet, planned v3.3. can read bit more here.
you example design mixin appends selector. maybe in direction:
@mixin inverse($selector){ #{$selector}-inverse { .brand:hover { color: black; } } } @include inverse(".navbar");
Comments
Post a Comment