I've recently been exploring the Less &:extend feature.
My goal is to nest multiple extends - essentially extending a class that itself extends another class.
However, after testing it out, I'm not sure if it's working as expected. It seems like the first extend works fine, but the second nested extend doesn't.
I've searched through the Less website and some reputable blogs, but I couldn't find any information on whether this is even possible.
Here's an example of what I'm trying to do:
.clearfix
{
&:before,
&:after {
content: " ";
display: table;
}
&:after {
clear: both;
}
}
.inline-list
{
&:extend(.clearfix all);
> li {
float:left;
}
}
.test
{
&:extend(.inline-list all);
// The clearfix class is not extended to test
}
Any advice or insights would be greatly appreciated.