I'm pretty new in the use of less files and I'm staked in the attempt of changing the value of some constants in variables.less.
I already tried many solutions like the ones described here or here. I'm struggling because even if I change the variables.less file redefining the constants I want to change, the browser shows the same output as with the former variables.less, as it was not changed at all.
I recompiled with Web Compiler all the less files I modified. I also tried to use the "Build->Recompile all files in the solution" menu item, without success. I added the file to the compilerconfig.json using the right button menu item "Web Compiler->Compile File" and I tried also to run the compiler directly from the Task Runner Explorer. Everything seems to work during compilation, but when I restart the web site (I'm still using the IIS Express to debug the website) the changes aren't applied.
What I'm trying to change are the constants:
@table-cell-padding: 8px;
@table-condensed-cell-padding: 5px;
that change the style of a bootstrap table to a more compact table. I simulated with success this change modifying the padding values directly using the Chrome browser inspector. I did it with success also changing the padding in the style.css, that in the layout is now defined before the bootstrap.css:
<link rel="stylesheet" href="~/css/style.css" />
<link rel="stylesheet" href="~/lib/bootstrap/dist/css/bootstrap.css" />
I've tried to create a new custom.less in a separate (../shared) folder calling the bootstrap variables.less file as in the following code.
@import "../less/variables.less";
@table-cell-padding: 5px;
@table-condensed-cell-padding: 2px;
with no success.
Debugging using Chrome I've found that no matter what I do, the code inspection shows always the former values of the constants, even if these constants have been changed also in the variables.less file.
Any suggestion is appreciated.