Skip to content

Instantly share code, notes, and snippets.

@BruceMcKinnon
Created October 22, 2020 22:33
Show Gist options
  • Save BruceMcKinnon/9458f299bea265fcbd7ec4e59b97a489 to your computer and use it in GitHub Desktop.
Save BruceMcKinnon/9458f299bea265fcbd7ec4e59b97a489 to your computer and use it in GitHub Desktop.
Foundation SCSS for 5 column and 7 column grids
//
// 5 columns in a 12 column grid
//
.grid-x > .small-2-4 {
@include grid-column(2.4); // (12/5 = 2.4)
}
.grid-x > .medium-2-4 {
@include breakpoint(medium) {
@include grid-column(2.4); // (12/5 = 2.4)
}
}
.grid-x > .large-2-4 {
@include breakpoint(large) {
@include grid-column(2.4); // (12/5 = 2.4)
}
}
.grid-x > .xlarge-2-4 {
@include breakpoint(xlarge) {
@include grid-column(2.4); // (12/5 = 2.4)
}
}
//
// 7 columns in a 12 column grid
//
.grid-x > .small-1-7 {
@include grid-column(1.7); // (12/7 = 1.7)
}
.grid-x > .medium-1-7 {
@include breakpoint(medium) {
@include grid-column(1.7); // (12/7 = 1.7)
}
}
.grid-x > .large-1-7 {
@include breakpoint(large) {
@include grid-column(1.7); // (12/7 = 1.7)
}
}
.grid-x > .xlarge-1-7 {
@include breakpoint(xlarge) {
@include grid-column(1.7); // (12/7 = 1.7)
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment