-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
"Place" mixin #1
Comments
The .placed-item {
@include span(2, 1); // Span 2 columns starting at the first column
@include row-span(1, 1); // Span 1 column starting at the first column
align-self: end;
} Which would become .placed-item {
grid-column: 1 / span 2;
grid-row: 1 / span 1;
align-self: end;
} Is there a specific need to use the |
I think this may be less about that piece of notation and more about "Should alignment be included in span maybe as an optional argument?" and also "Is span the proper name? (naming stuff is hard)" Edit: Getting buy-in from Grid advocates, I think "Placing" will make them more comfortable than "span" since it evokes more of the 2-dimensional aspects and "spanning" feels more 1-dimensional |
The Considering that when working with the grouping of Finally, I do not believe that adding alignment in to these mixins is something that would prove useful or align with their single dimensional intention. A 2-dimensional mixin may be a better place for that, but we need to consider what the advantage of that mixin may provide over writing the alignment property and using these two mixins for vertical and horizontal placement and sizing. I would prefer not to write a grid system or a full abstraction over all of Grid just to have an abstraction layer, but rather provide a small set of abstractions that smooth the mental model transition from the aforementioned grid frameworks to CSS Grid. The lighter the touch, the better. It is this very reason why the Grid |
Part of the power of grid is being able to place items across both x and y axis. I'm not sure if this is a refactor of the span mixin or a new mixin on top of that, but I think having a full-featured "placement" mixin would be interesting.
I played with an implementation, but Sass doesn't dig on the Grid notation of
grid-column: start / end
Potential Example output:
The text was updated successfully, but these errors were encountered: