Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Helper Sass mixin to place CSS Grid items into rows in Internet Explorer (11)
// There is no auto placement for CSS Grid items in IE.
// Sow we need to place the items into rows.
@mixin ie-grid-rows($start: 1, $rows: 50, $container: true, $shift: 0) {
@for $i from $start through $rows {
$row: $i - $shift;
@if $container {
> *:nth-child(#{$i}) {
-ms-grid-row: $row;
}
}
@else {
&:nth-child(#{$i}) {
-ms-grid-row: $row;
}
}
}
}
@thamas

This comment has been minimized.

Copy link
Owner Author

@thamas thamas commented Mar 26, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment