【问题标题】:Bootstrap less files: vertical-three-colors undefined引导较少的文件:垂直三色未定义
【发布时间】:2014-10-06 08:00:27
【问题描述】:

我从 Bootswatch 下载了一个不错的 theme,但我想更改一些颜色。所以我得到了 bootswatch.lessvariables.less 并使用 WinLess 编译了一个合并文件。

当我这样做时,我收到以下错误:

undefined #gradient > .vertical-three-colors

我在 github 上阅读了一个问题,指出应该包括:bootstrap.import.less

但我在 bootstrap 发行版中找不到这个。

希望你能帮忙。

【问题讨论】:

  • 您从 Bootswatch 下载了哪个主题?您应该在问题中链接到它。
  • 您使用的是哪个版本的引导程序?如果是 Bootstrap 3 那么你需要导入 mixins/gradients.less
  • 嗨尼尔海姆。我使用 3.20 版,并尝试在 gradidents.less 之前添加。现在它说 .transitions 是未定义的。我知道这种方法很糟糕 - 但我只想改变一两种颜色而不必处理 git、grunt 和所有其他类型的首字母缩略词,我不知道 :) 的含义
  • 嗨,Marco Del Vall,我添加了 Bootswatch Spacelab 主题的链接。
  • 我想最简单的方法(就像我通常自己做的那样):创建“my-whatever-bootswatch-theme-name.less”文件,导入三个那里需要的文件(参见示例gist)并编译它(only 文件)。就是这样。

标签: css twitter-bootstrap twitter-bootstrap-3 less bootswatch


【解决方案1】:

就我而言,_bootswatch.scss 遇到了同样的问题。

yo angular 之后用bootstrap-sass 替换 main.scss 中的所有文本:

@import "bootstrap-sass-official/assets/stylesheets/bootstrap/mixins/_gradients.scss";
@import "bootstrap.css";
@import "_variables.scss";
@import "_bootswatch.scss";

【讨论】:

    【解决方案2】:

    该问题与缺少 Gradient Mixins 有关。简单的解决方法是下载最新的bootstrap源代码并导入

    @import "path\bootstrap-3.3.7\bootstrap-3.3.7\less\mixins\gradients.less";

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2015-09-05
      • 1970-01-01
      • 1970-01-01
      • 2023-03-29
      • 1970-01-01
      • 2013-08-11
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多