0

我正在准备页面布局,必须使用 Bootstrap 3。我有一个渐变按钮,所以我想使用 Bootstrap mixin #gradient.horizontal

background: #gradient.horizontal(@color-start,@color-end,0%,100%);

但是在运行编译任务时出现解析错误:

[13:21:24] { type: 'Parse',
filename: 'path_to_file.less',
index: 535,
line: 23,
callLine: NaN,
callExtract: undefined,
column: 18,
extract: 
  [ '      display: block;',
    '      background: #gradient.horizontal(@color-start,@color-end,0%,100%);',
    '      box-shadow: 0 3px 10px -5px rgba(0, 0, 0, 1);' ],
message: 'Unrecognised input in file path_to_file.less line no. 23',
stack: undefined,
lineNumber: 23,
fileName: 'path_to_file.less',
name: 'Error',
showStack: false,
showProperties: true,
plugin: 'gulp-less',
__safety: { toString: [Function] } }

我正在使用无引导 v:3.3.8 并在 main.less 文件中导入整个引导@import "bootstrap/index";

我将不胜感激任何提示如何解决它

4

1 回答 1

1

好的,我找到了...抱歉弄乱了

它应该是:

#gradient.horizontal(@color-start,@color-end,0%,100%);

无背景:

于 2015-09-22T12:20:10.567 回答