You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It'd come in handy if Grassy allowed to repeat rows "forever", instead of forcing a full spec declaration. For example, a simple alternating layout such as the following will work only for 1, 2, 3 or 4 elements. The fifth element would not styled at all.
x-x x
x x-x
The grid mixin should accept a parameter $repeat, which can be set to true.
Extending the idea
However, it's not always desirable to repeat the whole layout. Consider this.
x-x-x
x x-x
x-x x
We might want to repeat the last two rows "forever". Something like $repeat-last: 2.
Thinking further
Of course, this begs for $repeat-first, or even $repeat: from 2 to 4 in cases like the following:
x-x-x
x x-x
x-x x
x-x-x
This would make sure that the first and last elements are always spanning across the whole grid, while the middle ones are alternating. However, even such a simple case would have too many edge cases to consider, which would have to be configurable in order to be sued properly:
What if there is only 1 element? 2?
How to even-out "dangling" elements?
This needs very careful consideration, so I'll open a new issue for this after the basic case is done first.
The text was updated successfully, but these errors were encountered:
Basic idea
It'd come in handy if Grassy allowed to repeat rows "forever", instead of forcing a full spec declaration. For example, a simple alternating layout such as the following will work only for 1, 2, 3 or 4 elements. The fifth element would not styled at all.
The
grid
mixin should accept a parameter$repeat
, which can be set totrue
.Extending the idea
However, it's not always desirable to repeat the whole layout. Consider this.
We might want to repeat the last two rows "forever". Something like
$repeat-last: 2
.Thinking further
Of course, this begs for
$repeat-first
, or even$repeat: from 2 to 4
in cases like the following:This would make sure that the first and last elements are always spanning across the whole grid, while the middle ones are alternating. However, even such a simple case would have too many edge cases to consider, which would have to be configurable in order to be sued properly:
This needs very careful consideration, so I'll open a new issue for this after the basic case is done first.
The text was updated successfully, but these errors were encountered: