Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 10 additions & 4 deletions content/features/extend.md
Original file line number Diff line number Diff line change
Expand Up @@ -333,24 +333,30 @@ Both of the above examples compile into:
}
```

However, `:extend` attached to an interpolated selector works:
However, `:extend` can be attached to an interpolated selector using the nested `&:extend` form:

```less
.bucket {
color: blue;
}
@{variable}:extend(.bucket) {}
@{variable} {
&:extend(.bucket);
}
@variable: .selector;
```

compiles to:

```less
.bucket, .selector {
```css
.bucket,
.selector {
color: blue;
}
```

> Note: `@{variable}:extend(.bucket) {}` does not currently extend the interpolated selector. Use the nested `&:extend` form shown above.


### Scoping / Extend Inside @media

Currently, an `:extend` inside a `@media` declaration will only match selectors inside the same media declaration:
Expand Down