我如何使用scssphp编译器将一个scss文件导入另一个scss文件?
内容导读
互联网集市收集整理的这篇技术教程文章主要介绍了我如何使用scssphp编译器将一个scss文件导入另一个scss文件?,小编现在分享给大家,供广大互联网技能从业者学习和参考。文章包含982字,纯文字阅读大概需要2分钟。
内容图文
![我如何使用scssphp编译器将一个scss文件导入另一个scss文件?](/upload/InfoBanner/zyjiaocheng/678/81d9f33b78ae4a18a1c767adb9d784af.jpg)
我正在使用scssphp编译器,以便我的scss文件使用PHP框架而不是默认的Ruby SASS监视服务器端进行编译.某种程度上,将scss文件包含在当前scss文件中的功能不起作用.
我有的代码:
@import 'grid';
_grid.scss与当前scss文件位于同一目录中.我在做什么错或者是scssphp编译器没有此功能?
解决方法:
看起来您可能需要配置@import路径.从文档:
When you import a file using the @import directive, the current path
of your PHP script is used as the search path by default. This is
often not what you want, so there are two methods for manipulating the
import path:addImportPath
, andsetImportPaths
.
addImportPath($path) will append $path to the list of the import paths
that are searched.setImportPaths($pathArray) will replace the entire import path with
$pathArray. The value of $pathArray will be converted to an array if
it isn’t one already.If the import path is set to array() then importing is effectively
disabled. The default import path is array(“”), which means the
current directory.
您可以阅读有关此here的更多信息
内容总结
以上是互联网集市为您收集整理的我如何使用scssphp编译器将一个scss文件导入另一个scss文件?全部内容,希望文章能够帮你解决我如何使用scssphp编译器将一个scss文件导入另一个scss文件?所遇到的程序开发问题。 如果觉得互联网集市技术教程内容还不错,欢迎将互联网集市网站推荐给程序员好友。
内容备注
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 gblab@vip.qq.com 举报,一经查实,本站将立刻删除。
内容手机端
扫描二维码推送至手机访问。