Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Adds support for specifying zero offsets
I've used colums and offsets to control element width in a few places, like so:
```
<div class="row">
   <div class="col-8 off-2 col-12-small off-0-small">
      content goes here
  </div>
</div>
```
Which needs a set of `off-0-???` classes generated for the various scenarios where it can be applied.
  • Loading branch information
dylanbeattie authored Feb 4, 2022
commit 61c7934a5583a52c9dce42ed262d12903c9cc4fe
9 changes: 6 additions & 3 deletions src/_html-grid.scss
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down Expand Up @@ -146,4 +149,4 @@

}

}
}