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

I am trying to get bootstrap and less.js, but I cannot succeed ... I have not worked much with less in the past, so I wonder if something is missing ... It runs on the sinology server. At run time, it seems that boostrap css is being generated, since "less: sandbox-css-bootstrap" is added to the html but does not get the value from the .less variables

Here is 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 I'm doing wrong? Thank you in advance

+6
source share
1 answer

Change the order of your initialization. Set the dependencies above the rest. like bootstrap.less place, above all other CSS

+4
source

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


All Articles