0

I just downloaded the Amelia theme from bootswatch.com and named it AmeliaBootswatch.less. Also, I downloaded the variables file and named it AmeliaVariables.less.

In the AmeliaBootstrap.less, I have the following tag:

@import "AmeliaVariables.less";

Now, in my aspx page, I have the following code:

<link rel="stylesheet/less" 
          type="text/css" 
          href="Content/LESS/AmeliaBootstrap.less" />
<script src="Scripts/LESS-1.5.0.min.js"
        type="text/javascript">
</script>
<script type="text/javascript">
        less.watch();
</script>

The less.watch() repeatedly gets the AmeliaBootstrap.less and AmeliaVariables.less files without throwing any errors.

Can somebody please help me with this?

Abhi
  • 3
  • 6
  • If it's finding the files, and there are no errors, then what's wrong? Is it loading the files more than once? Does it say it finds the files, but then the theme still doesn't work? – user1618143 Dec 02 '13 at 17:31
  • It doesn't apply the css styles to the page. It loads the .less files just once. – Abhi Dec 02 '13 at 17:39
  • You refer to `AmeliaBootswatch.less` and then load `AmeliaBootstrap.less` in your HTML page. Is this right? – Matt Andrews Dec 02 '13 at 17:42
  • I have mentioned the names incorrectly in my original post, which I'll be editing soon, but they both refer to AmeliaBootstrap.less files. – Abhi Dec 02 '13 at 18:03

1 Answers1

0

By default LESS starts in "production" mode (unless the page is running from "localhost") so it does not notify if any error occurs during compilation. You may need to set "development" mode to see possible errors, e.g.:

<script type="text/javascript">
    less.env = "development";
</script>

LESS options should be specified before the less script itself.

seven-phases-max
  • 11,765
  • 1
  • 45
  • 57