<div class="g-grid">
<div class="g-block size-33-3">
<div class="g-content">
<h3 class="g-title">Box 1</h3>
<p>Whatever you want here (Text, Images…)</p>
</div>
</div>
<div class="g-block size-33-3">
<div class="g-content">
<h3 class="g-title">Box 2</h3>
<p>Whatever you want here (Text, Images…)</p>
</div>
<div class="g-block size-33-3">
<div class="g-content">
<h3 class="g-title">Box 3</h3>
<p>Whatever you want here (Text, Images…)</p>
</div>
</div>
<div class="g-grid">
<div class="g-block size-33-3">
<div class="g-content">
<h3 class="g-title">Box 1</h3>
<p>Whatever you want here (Text, Images…)</p>
</div>
</div>
<div class="g-block size-33-3">
<div class="g-content">
<h3 class="g-title">Box 2</h3>
<p>Whatever you want here (Text, Images…)</p>
</div>
</div>
<div class="g-block size-33-3">
<div class="g-content">
<h3 class="g-title">Box 3</h3>
<p>Whatever you want here (Text, Images…)</p>
</div>
</div>
</div>
// Run Size Creation Function
@include size-x;
// Equal size fallbacks for older browsers
@each $i, $n in ('33-3', 1/3), ('49-5', 1/2), ('16-7', 1/6), ('14-3', 1/7), ('12-5', 1/8), ('11-1', 1/9), ('9-1', 1/11), ('8-3', 1/12) {
.size-#{$i} {
@include flex(0 percentage($n));
width: percentage($n);
}
}
// Support for non flex browsers
.size-100 {
width: 100%;
@include flex(0 100%);
}
// Run Size Creation Function
@include size-x;
// Equal size fallbacks for older browsers
@each $i, $n in ('2items', 1/2), ('3items', 1/3), ('4items', 1/4), ('5items', 1/5), ('6items', 1/6), ('7items', 1/7), ('8items', 1/8), ('9items', 1/9), ('10items', 1/10), ('11items', 1/11), ('12items', 1/12) {
.size-#{$i} {
@include flex(0 percentage($n));
width: percentage($n);
}
}
// Support for non flex browsers
.size-100 {
width: 100%;
@include flex(0 100%);
}
///* ----------- SIZE --------------*/
.size-2items { -webkit-box-flex: 0; -moz-box-flex: 0; box-flex: 0; -webkit-flex: 0 50%; -moz-flex: 0 50%; -ms-flex: 0 50%; flex: 0 50%; width: 50%; }
.size-3items { -webkit-box-flex: 0; -moz-box-flex: 0; box-flex: 0; -webkit-flex: 0 33.3332%; -moz-flex: 0 33.3332%; -ms-flex: 0 33.3332%; flex: 0 33.3332%; width: 33.3332%; }
.size-4items { -webkit-box-flex: 0; -moz-box-flex: 0; box-flex: 0; -webkit-flex: 0 25%; -moz-flex: 0 25%; -ms-flex: 0 25%; flex: 0 25%; width: 25%; }
.size-5items { -webkit-box-flex: 0; -moz-box-flex: 0; box-flex: 0; -webkit-flex: 0 20%; -moz-flex: 0 20%; -ms-flex: 0 20%; flex: 0 20%; width: 20%; }
.size-6items { -webkit-box-flex: 0; -moz-box-flex: 0; box-flex: 0; -webkit-flex: 0 16.6665%; -moz-flex: 0 16.6665%; -ms-flex: 0 16.6665%; flex: 0 16.6665%; width: 16.6665%; }
.size-7items { -webkit-box-flex: 0; -moz-box-flex: 0; box-flex: 0; -webkit-flex: 0 14.2856%; -moz-flex: 0 14.2856%; -ms-flex: 0 14.2856%; flex: 0 14.2856%; width: 14.2856%; }
.size-8items { -webkit-box-flex: 0; -moz-box-flex: 0; box-flex: 0; -webkit-flex: 0 12.5%; -moz-flex: 0 12.5%; -ms-flex: 0 12.5%; flex: 0 12.5%; width: 12.5%; }
.size-9items { -webkit-box-flex: 0; -moz-box-flex: 0; box-flex: 0; -webkit-flex: 0 11.1110%; -moz-flex: 0 11.1110%; -ms-flex: 0 11.1110%; flex: 0 11.1110%; width: 11.1110%; }
.size-10items { -webkit-box-flex: 0; -moz-box-flex: 0; box-flex: 0; -webkit-flex: 0 10%; -moz-flex: 0 10%; -ms-flex: 0 10%; flex: 0 10%; width: 10%; }
.size-11items { -webkit-box-flex: 0; -moz-box-flex: 0; box-flex: 0; -webkit-flex: 0 9.0908%; -moz-flex: 0 9.0908%; -ms-flex: 0 9.0908%; flex: 0 9.0908%; width: 9.0908%; }
.size-12items { -webkit-box-flex: 0; -moz-box-flex: 0; box-flex: 0; -webkit-flex: 0 8.3332%; -moz-flex: 0 8.3332%; -ms-flex: 0 8.3332%; flex: 0 8.3332%; width: 8.3332%; }
Time to create page: 0.061 seconds