Show warnings when extend() is missing base class?

35 views Asked by At

I'm doing some class extensions in Less, but it's silently failing if the class I attempt to extend isn't found. I'd really like to see a warning about that. Is there a way to enable it?

.foo {
    &:extend(.bar); // .bar is undefined, fails silently
}
1

There are 1 answers

0
seven-phases-max On

Less emits "extend fails" warnings by default since v2.3.0. Though by the time I'm writing this, only lessc itself shows these warnings. Other tools (e.g. gulp-less, grunt-contrib-less etc., i.e. those that use the Less library programmatically) need to explicitly implement a dedicated support for such warnings (there was no "warnings-facility" in Less before) and so far none actually did this yet.