css-gridish
css-gridish copied to clipboard
Add offset helper classes
Adds offset helper classes .#{$prefix}-grid__offset--[x]
to complement helper classes for columns.
For example the following:
<div class="bx-grid__col--sm--4 bx-grid__offset--sm--4">Element</div>
Would use the these rules for CSS grid:
.bx-grid__offset--sm--4.bx-grid__col--sm--4 {
grid-column: 5 / span 4;
}
And for legacy / flex:
.bx-grid__offset--sm--4 {
margin-left: calc((100vw - 10vw) * 0.3333);
margin-left: calc(((100vw - var(--scrollbar-width)) - 10vw) * 0.3333);
}
Interested in hearing your thoughts @seejamescode
@seejamescode Absolutely! Will update shortly.