我已经将 compass 与蓝图一起使用了一段时间,但我不明白的是为什么它会生成所有基本的蓝图 css 类。像这样:
#container .span-3 { width: 110px; }
#container .span-4 { width: 150px; }
我在创建 compass 元素时指定了 --using blueprint/semantic
,不,我的源代码中的任何地方都没有 @include blueprint
。为什么要生成这些类以及如何让 compass 不包含它们?
最佳答案
我试图重现您的问题,但我做不到。这是我所做的和我得到的:
compass create my_project --using blueprint/semantic
生成的 screen.scss 文件似乎需要您@import "blueprint"
,因为它最初包含以下几行:
// Import all the default blueprint modules so that we can access their mixins.
@import "blueprint";
生成的screen.css文件中没有任何地方包含.span-x
,唯一出现#container
的地方是body.two-col #容器 {
.
我修改了screen.scss文件,重新编译。没有变化——没有非语义类出现在 screen.css 中。
希望这有助于...
(使用 Compass 版本 0.11.5、Ruby 1.8.7、FreeBSD 8.2 测试)
关于css - Compass + Blueprint 非语义类,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/7036357/