Skip to content

Instantly share code, notes, and snippets.

@kenwheeler
Last active December 12, 2019 07:45
Show Gist options
  • Save kenwheeler/8583bc8f10cef7a28e4a to your computer and use it in GitHub Desktop.
Save kenwheeler/8583bc8f10cef7a28e4a to your computer and use it in GitHub Desktop.
Generated by SassMeister.com.
<div class="container">
<div class="column"></div>
<div class="column"></div>
<div class="column"></div>
<div class="column"></div>
</div>
// ----
// Sass (v3.4.4)
// Compass (v1.0.1)
// ----
$container-width: 100%;
$column-count: 4;
$margin: 1%;
.container {
width: $container-width;
}
.column {
background: #1abc9c;
height: 200px;
display: block;
float: left;
width: ($container-width / $column-count) - ($margin * 2);
margin: 0 $margin;
}
.container {
width: 100%;
}
.column {
background: #1abc9c;
height: 200px;
display: block;
float: left;
width: 23%;
margin: 0 1%;
}
<div class="container">
<div class="column"></div>
<div class="column"></div>
<div class="column"></div>
<div class="column"></div>
</div>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment