SCSS编译错误:期待颜色

时间:2015-07-22 22:19:34

标签: joomla sass materialize

有问题的直播页面:

http://a.nyaii.com

正在编译.scss文件时出错。我不是不熟悉HTML / CSS,但.scss对我来说是全新的,所以我不知道如何解决这个问题。非常感谢任何解决方案或提示。

此页面使用joomla使用Gantry 5模板构建。从MaterializeCSS中包含.scss文件后,我收到此错误。

相关行是:

行触发错误在_variables.scss第2-3行找到

$primary-color: color("materialize-red", "lighten-2") !default;
$primary-color-light: lighten($primary-color, 15%) !default; 

功能颜色的定义在_color.scss第402行找到

  @function color($color, $type) {
    @if map-has-key($colors, $color) {
      $curr_color: map-get($colors, $color);
      @if map-has-key($curr_color, $type) {
        @return map-get($curr_color, $type);
      }
    }
    @warn "Unknown `#{name}` in $colors.";
    @return null;
  }
$ colors的定义在_color.css第340行找到

$colors: (
  "materialize-red": $materialize-red,
  "red": $red,
  "pink": $pink,
  "purple": $purple,
  "deep-purple": $deep-purple,
  "indigo": $indigo,
  "blue": $blue,
  "light-blue": $light-blue,
  "cyan": $cyan,
  "teal": $teal,
  "green": $green,
  "light-green": $light-green,
  "lime": $lime,
  "yellow": $yellow,
  "amber": $amber,
  "orange": $orange,
  "deep-orange": $deep-orange,
  "brown": $brown,
  "blue-grey": $blue-grey,
  "grey": $grey,
  "shades": $shades
);

定义

$materialize-red: (
  "lighten-5":  #fdeaeb,
  "lighten-4":  #f8c1c3,
  "lighten-3":  #f3989b,
  "lighten-2":  #ee6e73,
  "lighten-1":  #ea454b,
  "base":       #e51c23,
  "darken-1":   #d0181e,
  "darken-2":   #b9151b,
  "darken-3":   #a21318,
  "darken-4":   #8b1014,
);

以上代码可在此处找到: http://a.nyaii.com/templates/rt_antares/custom/scss/materialize.scss http://a.nyaii.com/templates/rt_antares/custom/scss/components/_variables.scss http://a.nyaii.com/templates/rt_antares/custom/scss/components/_color.scss

可以在此处找到所有依赖项 http://a.nyaii.com/templates/rt_ambrosia/custom/scss/components/

1 个答案:

答案 0 :(得分:0)

这是一个已知的错误,因为Gantry5使用sass 3.2作为编译器,他们正在研究它。见https://github.com/gantry/gantry5/issues/1117