简体   繁体   中英

Show warnings when extend() is missing base class?

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
}

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 (eg gulp-less , grunt-contrib-less etc., ie 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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM