why less.js can't compute the color variables, but it computed when compile the less file to css? -


i use variables in less file this:

@base-color: #8156a3; @base-color-darker: (@base-color - #111);  #searchform{    border: 1px solid @base-color-darker; } 

when compile less file css file, variables work correctly, when use less file page style sheet, variables not affect in elements.

this how link less.js , less style sheet:

<script src="assets/js/less.min.js"></script> <link rel="stylesheet" href="assets/less/main.less" /> 

what's wrong?

from client-side usage:

link .less stylesheets rel set “stylesheet/less”:

<link rel="stylesheet/less" type="text/css" href="styles.less" /> 

but code is:

<link rel="stylesheet" href="assets/less/main.less" />            ^^^^^^^^^^ 

and:

make sure include stylesheets before script.

... have other way round:

<script src="assets/js/less.min.js"></script> <link rel="stylesheet" href="assets/less/main.less" /> 

to sum up: don't guess :)


Comments

Popular posts from this blog

image - ClassNotFoundException when add a prebuilt apk into system.img in android -

I need to import mysql 5.1 to 5.5? -

Java, Hibernate, MySQL - store UTC date-time -