Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can I get less.js and bootstrap to work?

I'm trying to get bootstrap and less.js working but I can't succeed... I have not worked much with less in the past, so I'm wondering if I'm missing something... It is runing on a synology server. On runtime it seems to generate the boostrap css as it should "less:sandbox-css-bootstrap" is append to the html but it does'nt get the value from variables.less

Here's my head

<meta charset="utf-8">   

<style>
 body {
    padding-top: 60px; /* 60px to make the container go all the way to the bottom of the topbar */
  }
</style>

<script type="text/javascript" src="js/jquery.min.js"></script>
<script src="js/bootstrap.js"></script>
<link rel="stylesheet/less" type="text/css" href="css/bootstrap.less">  
<script type="text/javascript" src="js/less-1.3.3.min.js"></script>


<!-- HTML5 shim, for IE6-8 support of HTML5 elements -->
<!--[if lt IE 9]>
  <script src="../assets/js/html5shiv.js"></script>
<![endif]-->

Does anyone know what am I doing wrong? Thanx in advance

like image 548
blop Avatar asked May 02 '13 14:05

blop


People also ask

Can you use LESS with Bootstrap?

Built with LESSBootstrap is made with LESS at its core, a dynamic stylesheet language created by our good friend, Alexis Sellier. It makes developing systems-based CSS faster, easier, and more fun.

Can we use Bootstrap and JavaScript together?

All Bootstrap's JavaScript files depend on util. js and it has to be included alongside the other JavaScript files. If you're using the compiled (or minified) bootstrap. js , there is no need to include this—it's already there.

Does Bootstrap work without JavaScript?

Bootstrap Carousels In web design, you can create a pure CSS carousel without JavaScript — or you can use Bootstrap to create one.

Does Bootstrap use LESS or sass?

Sass is compiled down to CSS before it's used on web pages. Until Bootstrap version 3. x, you had a choice between CSS preprocessors: Less or Sass. But since version 4, Bootstrap uses only Sass.


1 Answers

Change the order of your initialization. Place dependencies above the others. like place bootstrap.less above all other CSS's

like image 112
clu3Less Avatar answered Oct 01 '22 16:10

clu3Less