Open jvandenrym opened 5 years ago
Yeah, if index($span, 'last')
relies on the user explicitly adding last
to the span argument. A more robust approach would probably look like this (tested and updated):
$span: map-get($context, 'span');
$location: map-get($context, 'location') or 1;
$end: $span + $location - 1;
$is-last: ($end == length(map-get($context, 'columns')));
You shouldn't need the to-list helper. susy-compile()
should already normalize everything
I have created a gist with susy 3 and a span mixin. https://gist.github.com/jvandenrym/64070b3cc0920ba7752bd2b495ca3ab1
The checking of the last item does not do anything. Not sure I can even use this expression.
@if index($span, 'last') {