0

I've been looking around to see if one can import a .scss file by using the url of the directory online?

screengrab of directory url

I've tried using @import url('https://<site-url>/api/style/variables.scss') in my .scss files, but this does not seem to import those variables.

Timothy Macharia
  • 2,641
  • 1
  • 20
  • 27

1 Answers1

0

Remote file imports in SASS are compiled as CSS imports. The variables do not get considered in a remote location because SASS will treat it as an ordinary CSS file.

See the SASS documentation on imports for more information. https://sass-lang.com/documentation/at-rules/import#plain-css-imports

This question has some information about this subject as well Can I import an externally hosted file with sass?

macintosh
  • 98
  • 8