On this page: https://lesscss.org/features/#extend-feature-extend-all
This example does not work:
.bucket { color: blue; }
@{variable}:extend(.bucket) {}
@variable: .selector;
compiles to:
.bucket, .selector { color: blue; }
You need to write it like this:
.bucket { color: blue; }
@{variable} { &:extend(.bucket); }
@variable: .selector;
compiles to:
.bucket, .selector { color: blue; }
As I understand it, LESS treats interpolation as "late binding", so :extend() cannot be applied to a selector that has not yet been formed at the parsing stage.
On this page: https://lesscss.org/features/#extend-feature-extend-all
This example does not work:
.bucket { color: blue; }@{variable}:extend(.bucket) {}@variable: .selector;compiles to:
.bucket, .selector { color: blue; }You need to write it like this:
.bucket { color: blue; }@{variable} { &:extend(.bucket); }@variable: .selector;compiles to:
.bucket, .selector { color: blue; }As I understand it, LESS treats interpolation as "late binding", so :extend() cannot be applied to a selector that has not yet been formed at the parsing stage.