Permalink
Browse files

Document import-once. Fixes #35

  • Loading branch information...
1 parent cfcd799 commit ff87bb5d4835cb0f2bbf1dc464d419203277d53d @lukeapage lukeapage committed Jan 1, 2013
Showing with 10 additions and 2 deletions.
  1. +10 −2 templates/pages/doc.md
@@ -541,11 +541,19 @@ The `.less` extension is optional, so both of these are valid:
@import "lib.less";
@import "lib";
-If you want to import a CSS file, and don't want LESS to process it, just use the `.css` extension:
+If a file already has an extension or parameters, it will not get ".less" added on the end. If you want to import a CSS file,
+and don't want LESS to process it, just use the `.css` extension:
@import "lib.css";
-The directive will just be left as is, and end up in the CSS output.
+The directive will just be left as is, and end up in the CSS output. This will occur for any import that ends in css, before url parameters.
+
+If you want to import a file only if it has not been imported already, use `@import-once`
+
+ @import-once "lib.less";
+ @import-once "lib.less"; // will be ignored
+
+`@import-once` will be the default behaviour of @import in 1.4.0
String interpolation
--------------------

0 comments on commit ff87bb5

Please sign in to comment.