Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

SASS Won't Compile @import Google Font CDN

I've had this issue lately on other developers SASS projects where the Google CDN import won't compile -- See screenshots, saves fine when commented out.

I read a few articles on this issue and it was suggested to do this command:

gem install compass

I don't use compass, I use a SASS plugin for Coda. Guessing the previous developer used Compass to compile? Figured this might help the compiling issue.

enter image description here

enter image description here

like image 576
Justin Meyers Avatar asked Oct 13 '14 22:10

Justin Meyers


1 Answers

The Sass import code should look like this:

@import url(http://fonts.googleapis.com/css?family=Open+Sans:300italic,400italic,700italic,400,300,700);

You are importing from an URL, but your code is written as if you were importing a local file—that is why the error message says it can't be found.

Here's a little tutorial on how to use Google fonts with Sass.

like image 149
thosetinydreams Avatar answered Nov 09 '22 12:11

thosetinydreams