私は個別のゲートウェイ用に使用するネストされたフレックスボックスグリッドを構築しました。現在、おそらくoutline
が使用されているため、各コンテナ内のコンテンツは、各ゲートウェイを囲む空白に跨っており、各div間のスペースとして機能します。ネストされたフレックスボックスグリッド
グリッド間隔を処理するより良い方法がありますが、コンテンツがdivアウトラインに重なっていないことを確認できますか?私は問題を説明するJSFiddleを含んでいます(二次ゲートウェイで最もよく見られる)。ここ
JSFiddle:https://jsfiddle.net/graemebryson/6gehj4v7/
HTML
<!-- Product Grid -->
<div class="flex-grid">
<div class="flex__direction--column">
<div class="flex__direction--row">
<!-- Primary Gateway -->
<div class="item item--primary">
<div class="item__description">
<h3>Primary Gateway</h3>
<p>It is a long established fact that a reader will be distracted by the readable.</p>
</div>
</div>
<div class="item flex__direction--column">
<!-- Secondary Gateway -->
<div class="item item--secondary">
<div class="item__description">
<h4>Secondary Gateway</h4>
<p>It is a long established fact that a reader will be distracted by the readable.</p>
</div>
</div>
<div class="item">
<div class="flex__direction--row">
<!-- Tertiary Gateway -->
<div class="item item--tertiary">
<div class="item__description">
<h5>Tertiary Gateway</h5>
<p>It is a long established fact that a reader will be distracted by the readable.</p>
</div>
</div>
<!-- Tertiary Gateway -->
<div class="item item--tertiary">
<div class="item__description">
<h5>Tertiary Gateway</h5>
<p>It is a long established fact that a reader will be distracted by the readable.</p>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
SCSSは
// Grid
.flex-grid {
.item {
flex: 1;
outline: 5px solid white;
min-height: 150px;
}
}
// Set Flex Direction - Column
.flex__direction--column {
display: flex;
flex-direction: column;
-ms-flex-direction: column;
-webkit-flex-direction: column;
}
// Set Flex Direction - Row
.flex__direction--row {
display: flex;
flex-direction: row;
-ms-flex-direction: row;
-webkit-flex-direction: row;
}
は、失敗した以前のコンフィギュレーションが異なるマージンを試している必要があります。ありがとう、笑! @LGSon –