Reputation: 5651
I am using less with bootstrap but for some reasons the changes I make in my "variables.less" are not reflected in the generated css.
Below is a code sample:
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Yazeba - A simple property search engine.</title>
<link rel="stylesheet/less" type="text/css" href="template/less/bootstrap.less" />
<script type="text/javascript" src="template/js/jquery-1.9.1.min.js"></script>
<script type="text/javascript" src="template/js/bootstrap.min.js"></script>
<script type="text/javascript" src="template/less-lib/less-1.3.3.min.js"></script>
</head>
<body>
<a href="#">Change font color of this using variables.less</a>
</body>
</html>
I have checked and all the files are loaded properly, also the bootstrap.less is rendered properly in <style>..</style>
tags, but the changes made to variables.css are not reflated here..
Also I don't have any css which conflicts with the changes. File permissions and directories are okay as well (I can access all using the browser).
Would appreciate some help with this.
Thanks in advance.
Upvotes: 1
Views: 3491
Reputation: 5651
I figured out what was wrong....
The bootstrap.less was cached by my browser and for every request rather then compiling a fresh copy, my browser was using the cached copy and hence not reflecting the new changes...
To solve this problem I've called my css like this and it worked.
<link rel="stylesheet/less" type="text/css" href="template/less/bootstrap.less<?php echo '?ver='.microtime(); ?>" />
Hope this helps someone...
Upvotes: 2