Use selector name as variable in LESS mixin
问题 I'm trying to create a mixin within LESS that will use it's selector name as a variable inside of the mixing. The mixin should look something like this, but I cannot find the exact syntax for it or if it's even possible: .bg{ background-image: url('images/@{SELECTORNAME}.png'); } #header{ .bg; } results in: #header{ background-image: url('images/header.png'); } I'm thinking this isn't possible, plus what would happen if the selecter was something like: div#menu ul li That wouldn't really work