1

6 列の固定幅のグリッドがありますが、特定の「行」を 5 列にしたいのですが、それは可能ですか?

@import "susy";
@include border-box-sizing;

// The 1000px grid
$total-columns: 6;
$column-width: 150px;
$gutter-width: 20px;
$grid-padding: 0;

$container-style: static;
$container-width: 1000px;

$show-grid-backgrounds  : true;

ありがとう

4

1 に答える 1

1

確かにそうです。すべてのスージーの数学は単純に に基づいてcolumns / contextいるため、コンテキストについてスージーに嘘をつくことで、必要な数の列を作成できます。

$total-columns: 6;

.container {
  @include container;
  .tricky {
    @include span-columns(1,5); // tell Susy there are 5 columns, and suddenly there are.
  }
}

もっと正直に言いたい場合、または 5 をより大きなコードのチャンクのデフォルト コンテキストにする場合は、そのコードをブロック内layout(5) { ... }またはwith-grid-settings(5) { ... }ブロック内でラップするだけ$total-columns == 5です。

于 2012-09-08T14:58:06.840 に答える