Lesscss > bootstrap's darken() and lighten() don't compile

ⅰ亾dé卋堺 提交于 2019-12-10 17:26:37

问题


My Less files aren't compiling as they should. I'm using the Bootstrap less files, most recent ones.

It looks like the less-files are failing because of the darken() and lighten() classes.

The error is:

lessc fatal error: expected color value: failed at background-color: darken(@inputBackground, 1%); /Applications/MAMP/htdocs/foobar/application/less/forms.less on line 195

When I go to that line, I find the darken() of lighten(), remove that and the error is gone. But a new error appears, also a line with the darken() of lighten() class. Strange, right, or isn't it? Is there a fix someone knows about? Because I don't wanna remove the lighten() and darken() everywhere, they're the nicest functions in Bootstrap less!

Saved the files to UTF8 without BOM already in SublimeText2

Edit: strange, it works when it's on my NAS. Not local on my MacBook.. Is it a OSX issue?


回答1:


My problems were solved once I changed the order of less file @import rules. The colour definition should be parsed before darken() is called.



来源:https://stackoverflow.com/questions/15173360/lesscss-bootstraps-darken-and-lighten-dont-compile

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!