gpt4 book ai didi

compiler-construction - Less不能使用Twitter Bootstrap编译文件

转载 作者:行者123 更新时间:2023-12-02 10:49:28 25 4
gpt4 key购买 nike

我在使用较少的文件和Twitter Bootstrap时遇到了奇怪的问题:

我已经进行了深入的调查,但仍然面临着问题。

我已经下载了less和Twitter Bootstrap的最新版本,并以这种方式整理了文件:

无需引导

/*!
* Bootstrap v2.2.2
*
* Copyright 2012 Twitter, Inc
* Licensed under the Apache License v2.0
* http://www.apache.org/licenses/LICENSE-2.0
*
* Designed and built with all the love in the world @twitter by @mdo and @fat.
*/

// Core variables and mixins
@import "less/variables.less"; // Modify this for custom colors, font-sizes, etc
@import "less/mixins.less";

// CSS Reset
@import "less/reset.less";

// Grid system and page structure
@import "less/scaffolding.less";
@import "less/grid.less";
@import "less/layouts.less";

// Base CSS
@import "less/type.less";

// Utility classes
@import "less/utilities.less"; // Has to be last to override when necessary

在我的文件夹中,我把所有文件都放了

无变量
无混合
无重置
少布局
无类型
少实用
脚手架
无网格

我读到,如果文件是用BOM编码的,则可能导致此问题。我从Sublime切换到Dreamweaver以保存没有BOM的索引,但是没有成功。

奇怪的是,Less不仅编译了一些文件,而且还告诉我很少有 undefined variable ,例如: @baseFontFamily , @baseFontSize, @gridColumnwidth, @gridGutterwidth,但是这些变量是在我的variables.less中设置的,并且文件bootstrap.less和variables.less都已成功加载。
我上传了打印屏幕以更好地说明我的情况

是什么原因引起的?

感谢您的耐心配合,希望您能理解我的观点

最佳答案

看来您正在独立加载文件。不用编译less/*.less而是只编译less/bootstrap.less

关于compiler-construction - Less不能使用Twitter Bootstrap编译文件,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/14093759/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com