2015-10-29 12:35:33 -04:00
|
|
|
/*
|
|
|
|
Frameless <http://framelessgrid.com/>
|
|
|
|
by Joni Korpi <http://jonikorpi.com/>
|
|
|
|
licensed under CC0 <http://creativecommons.org/publicdomain/zero/1.0/>
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
|
|
//
|
|
|
|
// Configuration
|
|
|
|
//
|
|
|
|
|
|
|
|
$font-size: 16px; // Your base font-size in pixels
|
|
|
|
$em: $font-size / 1em; // Shorthand for outputting ems
|
|
|
|
|
|
|
|
$column: 60px; // The column-width of your grid in pixels
|
|
|
|
$gutter: 20px; // The gutter-width of your grid in pixels
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//
|
|
|
|
// Column-widths in variables, in ems
|
|
|
|
//
|
|
|
|
|
|
|
|
$cols1: ( 1 * ($column + $gutter) - $gutter) / $em;
|
|
|
|
$cols2: ( 2 * ($column + $gutter) - $gutter) / $em;
|
|
|
|
$cols3: ( 3 * ($column + $gutter) - $gutter) / $em;
|
|
|
|
$cols4: ( 4 * ($column + $gutter) - $gutter) / $em;
|
|
|
|
$cols5: ( 5 * ($column + $gutter) - $gutter) / $em;
|
|
|
|
$cols6: ( 6 * ($column + $gutter) - $gutter) / $em;
|
|
|
|
$cols7: ( 7 * ($column + $gutter) - $gutter) / $em;
|
|
|
|
$cols8: ( 8 * ($column + $gutter) - $gutter) / $em;
|
|
|
|
$cols9: ( 9 * ($column + $gutter) - $gutter) / $em;
|
|
|
|
$cols10: (10 * ($column + $gutter) - $gutter) / $em;
|
|
|
|
$cols11: (11 * ($column + $gutter) - $gutter) / $em;
|
|
|
|
$cols12: (12 * ($column + $gutter) - $gutter) / $em;
|
|
|
|
|
2016-06-15 15:08:56 -04:00
|
|
|
$desktop: 942px;
|
2019-01-29 10:35:19 -05:00
|
|
|
$mobileIntermediate: 640px;
|
2019-01-28 21:15:00 -05:00
|
|
|
$tabletPortrait: 768px;
|
2016-06-15 15:08:56 -04:00
|
|
|
$mobile: 480px;
|
|
|
|
|
2018-10-05 10:25:56 -04:00
|
|
|
/* Media Queries */
|
|
|
|
|
|
|
|
/* Width */
|
|
|
|
/*
|
|
|
|
* ... small | medium | intermediate | big ...
|
|
|
|
* ... medium-and-smaller |
|
|
|
|
* ... intermediate-and-smaller |
|
|
|
|
*/
|
|
|
|
|
2020-08-04 13:04:25 -04:00
|
|
|
$small: "only screen and (max-width : #{$mobile - 1})";
|
|
|
|
$medium: "only screen and (min-width : #{$mobile}) and (max-width : #{$tabletPortrait - 1})";
|
|
|
|
$intermediate: "only screen and (min-width : #{$tabletPortrait}) and (max-width : #{$desktop - 1})";
|
2018-10-05 10:25:56 -04:00
|
|
|
$big: "only screen and (min-width : #{$desktop})";
|
|
|
|
|
2020-08-04 13:04:25 -04:00
|
|
|
$medium-and-smaller: "only screen and (max-width : #{$tabletPortrait - 1})";
|
|
|
|
$intermediate-and-smaller: "only screen and (max-width : #{$desktop - 1})";
|
2018-10-05 10:25:56 -04:00
|
|
|
|
2020-08-04 13:04:25 -04:00
|
|
|
$medium-and-intermediate: "only screen and (min-width : #{$mobile}) and (max-width : #{$desktop - 1})";
|
2018-10-16 13:28:41 -04:00
|
|
|
|
2018-10-05 10:25:56 -04:00
|
|
|
/* Height */
|
|
|
|
|
2020-08-04 13:04:25 -04:00
|
|
|
$small-height: "only screen and (max-height : #{$mobile - 1})";
|
|
|
|
$medium-height: "only screen and (min-height : #{$mobile}) and (max-height : #{$tabletPortrait - 1})";
|
2018-10-05 10:25:56 -04:00
|
|
|
|
|
|
|
|
2015-10-29 12:35:33 -04:00
|
|
|
//
|
|
|
|
// Column-widths in a function, in ems
|
|
|
|
//
|
|
|
|
|
|
|
|
@mixin width ($cols: 1) {
|
|
|
|
width: ($cols * ($column + $gutter) - $gutter) / $em;
|
|
|
|
}
|
|
|
|
|
|
|
|
//4 columns
|
2016-06-15 15:08:56 -04:00
|
|
|
@mixin submobile ($parent-selector, $child-selector) {
|
2018-10-16 13:28:41 -04:00
|
|
|
@media #{$small} {
|
2016-06-15 15:08:56 -04:00
|
|
|
#{$parent-selector} {
|
|
|
|
text-align: center;
|
|
|
|
}
|
|
|
|
|
|
|
|
#{$child-selector} {
|
|
|
|
margin: 0 auto;
|
|
|
|
width: 100%;
|
|
|
|
}
|
|
|
|
|
|
|
|
@content;
|
2015-11-06 11:52:16 -05:00
|
|
|
}
|
2015-10-29 12:35:33 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
//6 columns
|
2016-06-15 15:08:56 -04:00
|
|
|
@mixin mobile ($parent-selector, $child-selector) {
|
2018-10-16 13:28:41 -04:00
|
|
|
@media #{$medium} {
|
2016-06-15 15:08:56 -04:00
|
|
|
#{$parent-selector} {
|
|
|
|
text-align: center;
|
|
|
|
}
|
|
|
|
|
|
|
|
#{$child-selector} {
|
|
|
|
margin: 0 auto;
|
|
|
|
width: $mobile;
|
|
|
|
}
|
|
|
|
|
|
|
|
@content;
|
2015-11-06 11:52:16 -05:00
|
|
|
}
|
2015-10-29 12:35:33 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
//8 columns
|
2016-06-15 15:08:56 -04:00
|
|
|
@mixin tablet ($parent-selector, $child-selector) {
|
2018-10-16 13:28:41 -04:00
|
|
|
@media #{$intermediate} {
|
2016-06-15 15:08:56 -04:00
|
|
|
#{$parent-selector} {
|
|
|
|
text-align: center;
|
|
|
|
}
|
|
|
|
|
|
|
|
#{$child-selector} {
|
|
|
|
margin: 0 auto;
|
2019-01-28 21:15:00 -05:00
|
|
|
width: $tabletPortrait;
|
2016-06-15 15:08:56 -04:00
|
|
|
}
|
2015-11-06 11:52:16 -05:00
|
|
|
}
|
2015-10-29 12:35:33 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
//12 columns
|
2016-06-15 15:08:56 -04:00
|
|
|
@mixin desktop ($parent-selector, $child-selector) {
|
2018-10-16 13:28:41 -04:00
|
|
|
@media #{$big} {
|
2016-06-15 15:08:56 -04:00
|
|
|
#{$child-selector} {
|
|
|
|
margin: 0 auto;
|
|
|
|
width: $desktop;
|
|
|
|
}
|
2015-11-06 11:52:16 -05:00
|
|
|
}
|
2015-10-29 12:35:33 -04:00
|
|
|
}
|
2016-06-15 15:08:56 -04:00
|
|
|
|
|
|
|
@mixin responsive-layout ($parent-selector, $child-selector) {
|
|
|
|
@include submobile($parent-selector, $child-selector);
|
|
|
|
@include mobile($parent-selector, $child-selector);
|
|
|
|
@include tablet($parent-selector, $child-selector);
|
|
|
|
@include desktop($parent-selector, $child-selector);
|
|
|
|
}
|
|
|
|
|
|
|
|
@include responsive-layout("#view", ".inner");
|