bootstrap3-less icon indicating copy to clipboard operation
bootstrap3-less copied to clipboard

Less compiler error

Open joystick opened this issue 11 years ago • 3 comments

Hi, I have following error:

While building the application:
client/views/venues/venues_new/venues_new.less:7:2: Less compiler error: .make-row is undefined

It happens when I do:

.new-venue {
    background: yellow;
    .make-row();
}

Please advise what can be wrong.

Thank you, Alexei

joystick avatar Jul 28 '14 08:07 joystick

you probably haven't included the mixins.less of bootstrap.

Do you use the Advanced Usage? If so, you need to @import your variables.import.less in every file which uses bootstrap mixins or variables.

Nemo64 avatar Jul 29 '14 07:07 Nemo64

Hi Nemo64, thanks for reply. I use steps 1 - 4 from here. My /client/app.less contains @import "/packages/bootstrap3-less/bootstrap.import.less"; only. This imported less file contains import directives for variables, mixins and rest of the stuff. Shouldn't mixins be imported and available?

joystick avatar Jul 29 '14 12:07 joystick

Ok.. so you import bootstrap in /client/app.less and then use a mixin in client/views/venues/venues_new/venues_new.less, right?

That sadly won't work because every .less file has its own scope of variables. You have 2 options:

  • Write all you .less files as .import.less and @import them in your app.less
  • Use the AdvancedUsage and import variables.import.less in every .less file.

You could also import bootstrap in every less file but than you have multiple instances of it, which you should avoid.

Nemo64 avatar Jul 29 '14 16:07 Nemo64