Skip to content

Instantly share code, notes, and snippets.

@ifcanduela
Created July 2, 2014 13:44
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ifcanduela/3701e20310eb24e2ce46 to your computer and use it in GitHub Desktop.
Save ifcanduela/3701e20310eb24e2ce46 to your computer and use it in GitHub Desktop.
How to import a CSS/LESS file from another project into a LESS namespace, prefixing all imported styles.
/* foreign.less */
/* new file, "bridge" between imported styles and stylesheet */
#export {
.styles() {
@import (less) "../../other-project/css/styles.css";
}
}
/* old file */
/* styles.less */
@import "foreign.less"
.some-container {
#export > .styles();
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment