1

I was wondering if it's possible to share my SASS variables between different projects from a central static server/location.

For example:

[Vars file on static server]
    |                  |
{Project 1     |  {Project 2
load vars then |  load the same
compile CSS}   |  vars and compile CSS}

The layout of project 2 is different but it has the same colours. That's why I want to share the vars.

Thanks for any help/suggestions!

moonunit7
  • 186
  • 2
  • 13

1 Answers1

1

The @import statement in SASS does not have the capability to import remote http files, it would treat an http import as a simple css import instead. (SASS @import documentation) However, there is a project on GitHub called remote-sass which does what you ask.

RemoteSass is a small gem that allows Sass to import remote sass/scss stylsheets over HTTP/S. With this, you can set up a central server to serve your stylesheet assets and share css among your many applications.

artlung
  • 33,305
  • 16
  • 69
  • 121