从SASS中删除未使用的Foundation网格类

时间:2013-10-23 18:40:14

标签: css sass zurb-foundation grid-layout

我对Foundation和SCSS有点新鲜。我在例子中尝试使用网格Mixin:

/* Each individual part that can be added in */
@import "foundation/components/global";
@import "foundation/components/grid";
// @import "foundation/components/visibility";
@import "foundation/components/block-grid";

#masthead { @include grid-row; @include panel;
  & > hgroup { @include grid-column(4); }
  & > section { @include grid-column(8); }
}

问题是生成的CSS具有预期的标头,hgroup,节类,但也有所有常见的.small-1,.large-2网格类等。

有没有办法告诉SASS不要生成这些“额外”类?

1 个答案:

答案 0 :(得分:0)

得到答案:How can one import only variables and mixins from Scss stylehsheets?

基本上在foundation / scss / foundation / components / _grid.scss中查找“$ include-html *”,设置为false,这应该关闭“额外”类。