vendor/assets/scss/grid/_layout.scss in foundation-rails-6.1.2.0 vs vendor/assets/scss/grid/_layout.scss in foundation-rails-6.2.0.0

- old
+ new

@@ -29,5 +29,23 @@ &:last-child { float: left; } } } + +/// Adds extra CSS to block grid children so the last items in the row center automatically. Apply this to the columns, not the row. +/// +/// @param {Number} $n - Number of items that appear in each row. +@mixin grid-layout-center-last($n) { + @for $i from 1 to $n { + @if $i == 1 { + &:nth-child(#{$n}n+1):last-child { + margin-left: (100 - 100/$n * $i) / 2 * 1%; + } + } + @else { + &:nth-child(#{$n}n+1):nth-last-child(#{$i}) { + margin-left: (100 - 100/$n * $i) / 2 * 1%; + } + } + } +}