Ionic 3在variables.scss文件中无效的css值

时间:2017-12-03 15:47:08

标签: ionic-framework sass ionic3

我的色彩变量中出现了一个奇怪的错误,我的代码:

$colors: (
  primary:    (base: #488aff, contrast:#000),
  secondary:  (base: #32db64, contrast:#000),
  danger:     (base: #f53d3d, contrast:#000),
  light:      (base: #f4f4f4, contrast:#000),
  dark:       (base: #222, contrast:#000),
  font:        (base: #fe5295, contrast:#000)
);

我得到的错误

(primary: (base: #488aff, contrast: #000), secondary: (base: #32db64, contrast: #000), danger: (base: #f53d3d, contrast: #000), light: (base: #f4f4f4, contrast: #000), dark: (base: #222, contrast: #000), font: (base: #fe5295, contrast: #000)) isn't a valid CSS value.

我的设置:

    @ionic/cli-utils  : 1.19.0
    ionic (Ionic CLI) : 3.19.0

global packages:

    cordova (Cordova CLI) : 6.4.0

local packages:

    @ionic/app-scripts : 3.1.4
    Cordova Platforms  : android 6.2.3 ios 4.4.0
    Ionic Framework    : ionic-angular 3.9.2

System:

    Node : v6.9.2
    npm  : 5.5.1
    OS   : Windows 10

关于可能出现什么问题的任何想法?

1 个答案:

答案 0 :(得分:1)

虽然错误来自variables.scss文件,但实际上它出现是因为一个名为ion2-calendar的npm库,一旦我从我的代码中删除它,一切都恢复正常了!