Reputation: 37
I'm trying to integrate LessCSS (version 1.0.41) with Blueprint but it seems that I can't import css files in my less stylesheet. So I tried a simpler import:
.red {
color: red;
}
and put it in test.css. Then, in less_test.css:
@import "test.css":
.test { .red; background-color: pink; }
But LessCSS complains that .red is not defined. What am I missing? If I rename test.css in test.less (and import it as "test") everything runs fine. But would it be safe to change blueprint files extension and use it as screen.less, print.less and ie.less?
Upvotes: 2
Views: 518
Reputation: 974
In the past I had the same problem. It turned out to be a simple fix.
I was attempting to use @import to load the BlueprintCSS screen.css file, I had made one inline comment in the screen.css file and left the /**/ in between to curly braces.
Bad code:
.class { margin-top: 12px /*24px*/; }
It turned out that the comment inside of the curly braces causes the LessCSS compiler to freak out and stop processing the file .. leaving out the other needed selectors to use as mixins.
I would see if the file you are importing is causing an error and not finishing the compile.
Upvotes: 0
Reputation: 53931
As an extension to CSS, LESS is not only backwards compatible with CSS, but the extra features it adds use existing CSS syntax.[1]
Which means that any valid CSS file is also valid LESS file, so you can safely rename your .css
files to .less
and you shouldn't have any problems.
Upvotes: 3