Importing CSS into LESS -
is there option in less import contents of css file rather adding @import
directive?
example
//example.less @import url("../css/site.css"); @import url("components.less"); //example.css @import url("site.css"); // don't want this! .component1 { ... } .component2 { ... }
can done less?
in less have different options importing.
syntax: @import (keyword) "filename";
the following import directives have been implemented:
- reference: use less file not output it
- inline: include source file in output not process it
- less: treat file less file, no matter file extension
- css: treat file css file, no matter file extension
- once: include file once (this default behavior)
- multiple: include file multiple times
- optional: continue compiling when file not found
more 1 keyword per @import allowed, have use commas seperate keywords: example: @import (optional, reference) "foo.less";
more info in docs.
Comments
Post a Comment