Angular-CLI全球SSSS Vairables [英] Angular-CLI global scss vairables

查看:62
本文介绍了Angular-CLI全球SSSS Vairables的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何在最新的Angular-CLI(使用webpack)中添加全局scss变量?

How to add global scss variables in latest Angular-CLI (with webpack)?

看起来像在styles.scss中定义的全局变量在组件样式中不可用.

Looks like global variables defined in styles.scss are not available in the component styles.

推荐答案

它们将需要通过相对路径导入到组件的SCSS文件中.这将使编译器找到必要的父文件进行处理.

They will need to be imported into the component's SCSS file via a relative path. This will allow the compiler to find the necessary parent file(s) for processing.

这篇关于Angular-CLI全球SSSS Vairables的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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