Is there a way to tell less-css/gulp-less to leave an @import rule as-is -


i'd css file produced less compiler contain @import directive @ beginning of file.

i.e. given less file:

@import "external.css" /* import directive should left */ @import "globals.less" { color: @linkcolor; } /* defined in globals.less */ 

the resulting css file should this:

@import "external.css" { color: #00a; } 

it seems none of various options of less import directive helps producing this. there other way?


update: i'm using gulp-less compile less files. might problem package , not less (@import (css) "external.css"; doesn't give desired result).

update: seem gulp-less problem (or other library in chain) because code in question should output @import statement as-is without using (css) option. the less compiler seems capable of reading file extension , if css leaves @import directive as-is. so, should not less compiler issue.


yes, try using css keyword @import (css) "external.css";. when keyword used, less compiler output import statement as-is.

@import (css) "external.css"; @import "globals.less"; {    color: @linkcolor;  }  

would compile to

@import "external.css"; {   color: #00a; } 

Comments

Popular posts from this blog

unity3d - Rotate an object to face an opposite direction -

angular - Is it possible to get native element for formControl? -

javascript - Why jQuery Select box change event is now working? -