-1

In my sass I have the following line:

@import url(http://fonts.googleapis.com/css?family=Source+Sans+Pro:400,700|Droid+Serif:400,400italic,700);

If I paste that Url in the browser I can see that absolute Urls are defined for each font, such as :

src: local('Droid Serif'), local('DroidSerif'), url(http://fonts.gstatic.com/s/droidserif/v6/0AKsP294HTD-nvJgucYTaI4P5ICox8Kq3LLUNMylGO4.woff2) format('woff2');

But on the my page at http://misterfresh.github.io/react-drive-cms

you can see in the console that I have three errors for missing fonts, such as:

GET http://misterfresh.github.io/fonts.gstatic.com/s/sourcesanspro/v9/toadOcfmlt9b38dHJxOBGLsbIrGiHa6JIepkyt5c0A0.ttf 
Mister Fresh
  • 670
  • 1
  • 10
  • 22
  • I don't know what this has to do with Sass. There's not enough information here to reproduce a problem, since Sass does not even touch external CSS files and can't possibly do what you're claiming. – cimmanon Oct 17 '15 at 14:08
  • i think you should add a tag in html page https://www.google.com/fonts#QuickUsePlace:quickUse – Vitorino fernandes Oct 17 '15 at 14:09
  • Cannot reproduce: http://sassmeister.com/gist/2a57eb4987a6c9194523 – cimmanon Oct 17 '15 at 14:48
  • @cimmanon If I knew what it had to do with, I wouldn't be posting the question in the first place – Mister Fresh Oct 17 '15 at 15:00
  • My point here is that you haven't even tried examining where the problem is coming from. You didn't look at the compiled CSS (that would have explained the 404). You've probably got a postprocessor mangling your CSS that you didn't even bother mentioning. – cimmanon Oct 17 '15 at 15:21
  • @cimmanon I'm using gulp-sass with libsass to compile sass and gulp-minify-css to minify css. Yes I played around with the $icon-font-path variable to see if that helped, but then I decided to post a question, and thanks to LarsW a workaround was found. – Mister Fresh Oct 17 '15 at 15:45

1 Answers1

0

In you CSS is now this as src:

url(../../fonts.gstatic.com/s/sourcesanspro/v9/toadOcfmlt9b38dHJxOBGLsbIrGiHa6JIepkyt5c0A0.ttf)

You can change it into (with or without quotes):

url(http://fonts.gstatic.com/s/sourcesanspro/v9/toadOcfmlt9b38dHJxOBGLsbIrGiHa6JIepkyt5c0A0.ttf)

Or just link the original thing.

LarsW
  • 1,514
  • 1
  • 13
  • 25
  • I copied the contents from url(http://fonts.googleapis.com/css?family=Source+Sans+Pro:400,700|Droid+Serif:400,400italic,700) directly towards the end of the css and it worked. still don't know why it failed with import – Mister Fresh Oct 17 '15 at 15:23