Bootstrap LESS context variable for individual files in eclipse

The Eclipse LESS plugin does not look like LESS boot files are being loaded into other files, and therefore it gives errors such as “In this context, the variable @ line-height-computed” is undefined. 'Although, I got a plugin to compile the LESS source successfully by compiling the main bootstrap.less file that imports all the other LESS files. This works because the variables are in the context of the main bootstrap.less files when compiling. I tried to configure the validation configuration for the plugin, but it didn’t work. Therefore I think my question is: is there a way to fix it these errors? Or do I need to live with them, although I am able to compile good?

+4
source share
2 answers

You can disable these errors in the LESS / Validation Preferences by unchecking:

  • Undeclared mixins
  • Undeclared variables

LESS / Validation Preferences

+2
source

Bootstrap LESS code was split into different files. Variables are defined in .less variables, so you can edit them all in one place. To compile Bootstrap, you must compile the main bootstrap.less file. You cannot compile one file because these files depend on other files (basically .less and mixins.less variables). Starting with version 3.2. also mixes are divided into different files. mixins.less imports these mixins files.

, mixins :

@import "variables"
@import "mixins"
+1

Source: https://habr.com/ru/post/1530752/


All Articles