I like using BEM for my css and I like to apply modifiers via the extend()
function of LESS.
ex:
.btn{
width: 100px;
&--blue:extend(.btn){
color: blue;
}
}
1st question : Why can't I write it with the shortcut &
like this ?
.btn{
width: 100px;
&--blue:extend(&){
color: blue;
}
}
2nd question : How can I call, in other less files, the generated classnames like :
.btn{
width: 100px;
&--blue:extend(.btn){
color: blue;
}
}
////
.myCustomButton{
.btn--blue;
}
Thanks.