Search code examples
lessgetuikit

Less @import not working as expected


I have an issue where I can't quite understand why the Less @import option is not working as expected despite trying numerous Less @import options. Here is the file in question (app.less):

@import "theme";
.nav-wrapper--background-white {
    background-color: #ffffff;
}

Initially, when I enter valid Less code in theme.less, the Less compiler does a few things:

1) It generates theme.css. 2) It generates app.less that includes the CSS from theme.css.

This is great. However, if I make subsequent changes in theme.less, the Less compiler regenerates theme.css with the revised changes but, the changes in theme.css are not merged into app.css.

What I am hoping will happen is that whenever I make a change in the referenced theme.less, its theme.css will be included in app.css.

I do this sort of thing in SASS/SCSS and it works as expected. I only started with Less yesterday and assume that the same thing can be achieved. Any pointers would be greatly appreciated.


Solution

  • This sounds like a problem with your compiler. I'm assuming from your tags that you're using, as what you're describing sounds like expected behavior.

    How are you compiling your less?