【问题标题】:How to use bootstrap mixin with LESS?如何在 LESS 中使用 bootstrap mixin?
【发布时间】:2015-09-22 20:20:10
【问题描述】:

我正在准备页面布局,必须使用 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] } }

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

我会很感激任何提示如何解决它

【问题讨论】:

    标签: twitter-bootstrap-3 less less-mixins


    【解决方案1】:

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

    应该是:

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

    没有背景:

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2023-03-28
      • 1970-01-01
      • 1970-01-01
      • 2013-03-11
      • 2013-05-06
      • 2013-10-26
      • 1970-01-01
      相关资源
      最近更新 更多