From e77b0d0a34e8975bd436bf59f59a986af04868c6 Mon Sep 17 00:00:00 2001 From: Pedro Reis Date: Tue, 1 Oct 2019 12:17:53 +0100 Subject: [PATCH] Added grid --- assets/styles/base/_grid.scss | 20 ++++++++++++++++++++ assets/styles/styles.scss | 1 + 2 files changed, 21 insertions(+) create mode 100644 assets/styles/base/_grid.scss diff --git a/assets/styles/base/_grid.scss b/assets/styles/base/_grid.scss new file mode 100644 index 0000000..c28ccbf --- /dev/null +++ b/assets/styles/base/_grid.scss @@ -0,0 +1,20 @@ +.grid { + display: grid; + grid-gap: $base-spacing-unit; + @include resp-max($breakpoint-sm) { + grid-gap: $base-spacing-unit / 2; + } + + @each $breakpoint in $breakpoints { + $name: nth($breakpoint, 1); + $declaration: nth($breakpoint, 2); + + @media only screen and #{$declaration} { + @for $i from 1 through 6 { + &.grid--#{$name}-#{$i}x { + grid-template-columns: repeat(#{$i}, 1fr); + } + } + } + } +} \ No newline at end of file diff --git a/assets/styles/styles.scss b/assets/styles/styles.scss index c251ed4..17c00fc 100755 --- a/assets/styles/styles.scss +++ b/assets/styles/styles.scss @@ -14,6 +14,7 @@ // 4. Base stuff @import 'base/base'; +@import 'base/grid'; @import 'base/fonts'; @import 'base/images'; @import 'base/forms';