Last active
May 19, 2017 19:41
-
-
Save carrieforde/e7d90077b0c877dbc0454d64af021974 to your computer and use it in GitHub Desktop.
Grids + Neat 2.0.0
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
//-------------------------------------------------------------- | |
// GRID | |
//-------------------------------------------------------------- | |
// Outputs .prefix-col-# | |
.prefix { | |
@include grid-classes(null, $neat-grid); | |
} |
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
//-------------------------------------------------------------- | |
// VARIABLES | |
//-------------------------------------------------------------- | |
//----------------------------------------- | |
// Grid Classes | |
//----------------------------------------- | |
//// | |
/// @author Carrie Forde | |
/// @group wds | |
//// | |
//// | |
/// @include grid-media($tablet-portrait-up) { | |
/// | |
/// .client-col { | |
/// @include grid-classes; | |
/// } // .client-col | |
/// } | |
/// | |
/// | |
/// .client-col-wide-1 { | |
/// width: calc(8.33333% - 2.8287rem); | |
/// float: left; | |
/// margin-left: 2.61111rem; | |
/// } | |
//// | |
@mixin grid-classes($gutter-name, $context) { | |
$columns: map-get($context, columns ); | |
@for $i from 1 through $columns { | |
// Generate the column classes. | |
&-#{$gutter-name}-#{$i} { | |
@include grid-column($i, $context); | |
} | |
} | |
} |
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
//-------------------------------------------------------------- | |
// VARIABLES | |
//-------------------------------------------------------------- | |
//----------------------------------------- | |
// Grid Settings | |
//----------------------------------------- | |
$neat-grid: ( | |
columns: 12, | |
gutter: 15px, | |
); | |
$gutter: 15px; | |
$max-width: 960px; | |
//----------------------------------------- | |
// Breakpoints | |
// | |
// Breakpoints use the Neat Grids so they | |
// can be passed to `grid-media()`. | |
//----------------------------------------- | |
$large-desktop: ( | |
media: 1680px | |
); | |
$desktop: ( | |
media: 1366px | |
); | |
$small-desktop: ( | |
media: 1200px | |
); | |
$tablet-landscape: ( | |
media: 1024px | |
); | |
$wp-admin-bar: ( | |
media: 783px | |
); | |
$tablet-portrait: ( | |
media: 768px | |
); | |
$phone-landscape: ( | |
media: 640px | |
); | |
$phone-portrait: ( | |
media: 360px | |
); |
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 'variables'; | |
@import 'mixins'; | |
@import 'grid'; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment