为什么Susy给我的列宽44.44444%而不是50%?

时间:2014-07-31 14:51:15

标签: css sass css-float compass-sass susy-compass

当参数中包含无檐槽时,无法弄清楚为什么我的列不是50%?

SCSS:

$susy: (
  global-box-sizing: border-box,
  gutters: 1/4,
  gutter-position: before
);

.columns {
  @include clearfix;
}

.column {   
  .twoColumns & {
    @include span (1 of 2 no-gutters);
  }
}

CSS:

.columns:after {
  content: "";
  display: table;
  clear: both;
}

.twoColumns .column {
  width: 44.44444%;
  float: left;
}

1 个答案:

答案 0 :(得分:4)

您必须使用内部值设置装订位置以获得50%的列:

$susy: (
  global-box-sizing: border-box,
  gutters: 1/4,
  gutter-position: inside
);

.columns {
  @include clearfix;
}

.column {   
  .twoColumns & {
    @include span (1 of 2 no-gutters);
  }
}