SASS将不编译@import Google字体CDN [英] SASS Won't Compile @import Google Font CDN

查看:427
本文介绍了SASS将不编译@import Google字体CDN的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我最近在其他开发人员SASS项目中遇到此问题,其中Google 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

我不使用指南针,我使用SASS插件为Coda。猜测以前的开发人员使用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.

>

>

推荐答案

Sass导入代码应如下所示:

The Sass import code should look like this:

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

您正在从一个URL导入,但是您的代码会像您导入本地文件一样写入,这是为什么错误消息说它找不到。

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.

这是一个小教程如何在Sass上使用Google字体

这篇关于SASS将不编译@import Google字体CDN的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆