Last active
August 29, 2015 14:06
-
-
Save davidvandenbor/aca144abba569a8efd6c to your computer and use it in GitHub Desktop.
SASS: Replace Foundation grid classes with semantic classes
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
| @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 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
| // b. Grid | |
| // - - - - - - - - - - - - - - - - - - - - - - - - - | |
| $include-html-grid-classes: false; |
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="row"> | |
| <main class="medium-9 columns"> | |
| <p>Main content</p> | |
| </main> | |
| <aside class="medium-3 columns"> | |
| <p>Sidebar</p> | |
| </aside> | |
| </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
| <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