【问题标题】:mixin variables not parsed correctly with Saas in visual studio 2015在 Visual Studio 2015 中未使用 Saas 正确解析 mixin 变量
【发布时间】:2016-08-21 09:00:23
【问题描述】:

在应用程序中使用 sass 与 2015,并像这样使用 mixin:

@mixin getHeightDueToElements($percent, $numberOfElements) {
  height: calc($percent/$numberOfElements);
  margin: auto;
}

然后当我打电话时:

@include getHeightDueToElements(100%, 3);

但不幸的是,在我看来,css 是这样的:

height: calc($percent/$numberOfElements);
margin: auto;

那就是mixin变量无法识别!

我安装了各种库,但似乎没有(编译器 Web、Web Essential)...

帮助

【问题讨论】:

    标签: css visual-studio-2015 sass


    【解决方案1】:

    你应该使用height: calc(#{$percent}/#{$numberOfElements}); 根据: Sass Calc

    你也可以看到这个问题:StackOverflow Question

    【讨论】:

      猜你喜欢
      • 2015-10-14
      • 1970-01-01
      • 1970-01-01
      • 2016-07-22
      • 1970-01-01
      • 2015-10-30
      • 1970-01-01
      • 1970-01-01
      • 2014-11-07
      相关资源
      最近更新 更多