From 61c7934a5583a52c9dce42ed262d12903c9cc4fe Mon Sep 17 00:00:00 2001 From: Dylan Beattie Date: Fri, 4 Feb 2022 13:32:31 +0000 Subject: [PATCH] Adds support for specifying zero offsets I've used colums and offsets to control element width in a few places, like so: ```
content goes here
``` Which needs a set of `off-0-???` classes generated for the various scenarios where it can be applied. --- src/_html-grid.scss | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/_html-grid.scss b/src/_html-grid.scss index 7438a8c..9c2b0f8 100644 --- a/src/_html-grid.scss +++ b/src/_html-grid.scss @@ -102,12 +102,15 @@ order: -1; } - // Columns, offsets. + // Columns. @for $i from 1 through $cols { > .col-#{$i}#{$suffix} { width: $unit * $i; } - + } + + // Offsets need to include a 0 so responsive layouts can override a default offset on smaller devices. + @for $i from 0 through $cols { > .off-#{$i}#{$suffix} { margin-left: $unit * $i; } @@ -146,4 +149,4 @@ } - } \ No newline at end of file + }