Last active
December 31, 2015 01:58
-
-
Save chrisdpeters/7917372 to your computer and use it in GitHub Desktop.
How to use the ZURB Foundation grid system without the meaningless class names http://www.chrisdpeters.com/foundation-grid-system-without-meaningless-class-names/
This file contains 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
@import "foundation/components/grid"; | |
.layout { | |
// `layout` container functions as a row | |
@include grid-row(); | |
} | |
.layout-content { | |
// Mobile-first: make `layout-container` full-width | |
@include grid-column(12); | |
// On medium-up size, make `layout-container` 9 columns wide | |
@media #{$medium-up} { | |
@include grid-column(9); | |
} | |
} | |
.layout-sidebar { | |
// Mobile-first: make `layout-sidebar` full-width | |
@include grid-column(12); | |
// On medium-up size, make `layout-sidebar` 3 columns wide | |
@media #{$medium-up} { | |
@include grid-column(3); | |
} | |
} |
This file contains 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
// b. Grid | |
// - - - - - - - - - - - - - - - - - - - - - - - - - | |
$include-html-grid-classes: false; |
This file contains 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="row"> | |
<main class="medium-9 columns"> | |
<p>Main content</p> | |
</main> | |
<aside class="medium-3 columns"> | |
<p>Sidebar</p> | |
</aside> | |
</div> |
This file contains 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="layout"> | |
<main class="layout-content"> | |
<p>Main content</p> | |
</main> | |
<aside class="layout-sidebar"> | |
<p>Sidebar</p> | |
</aside> | |
</div> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment