Last active
August 29, 2015 14:19
-
-
Save torleifhalseth/ed8004b1c318acadd958 to your computer and use it in GitHub Desktop.
Grid with static gutter using border
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<div class="modules"> | |
<div class="module"></div> | |
<div class="module"></div> | |
<div class="module"></div> | |
</div> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ---- | |
// libsass (v3.1.0) | |
// ---- | |
@import "bourbon/bourbon"; | |
@import "neat/neat"; | |
$background-color: darken(#ddd, 10%); | |
$gutter: 20px; | |
body {background: #ddd;} | |
.modules { | |
background: $background-color; | |
@include outer-container; | |
} | |
.module { | |
min-height: 100px; | |
background: #fff; | |
float: left; | |
width: percentage(1/3); | |
border-left: $gutter/2 solid $background-color; | |
border-right: $gutter/2 solid $background-color; | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
html { | |
box-sizing: border-box; } | |
*, *::after, *::before { | |
box-sizing: inherit; } | |
body { | |
background: #ddd; } | |
.modules { | |
background: #c4c4c4; | |
max-width: 68em; | |
margin-left: auto; | |
margin-right: auto; } | |
.modules:after { | |
content: ""; | |
display: table; | |
clear: both; } | |
.module { | |
min-height: 100px; | |
background: #fff; | |
float: left; | |
width: 33.33333%; | |
border-left: 10px solid #c4c4c4; | |
border-right: 10px solid #c4c4c4; } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<div class="modules"> | |
<div class="module"></div> | |
<div class="module"></div> | |
<div class="module"></div> | |
</div> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment