-
Notifications
You must be signed in to change notification settings - Fork 711
[css-grid-3][masonry] integration of alignment and spanning items #5902
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
I found this in spec finally, so would be good to apply the span element with a nearest position instead of any overlapping |
possible fix emulation when the track aligned to right when doesnt fit: when fits: aligned to center: |
Masonry layout doesn't have an exclusion model to prevent items from overlapping when applying alignment in the masonry axis (
I guess this issue is a feature request to spec an exclusion model for the alignment that would avoid causing spanning items to overlap. |
Introducing subtracks: the span elements determine subtracks inside the track. Note that we suppose that the dense behavior is implemented in the browser. We make dfference between the first, inbetweens and the last subtracks. This picture shows how the justify-tracks: space-between should work: Where guttermultiplier is the total number of gutter inside the subtrack. Summary: We have predeclared gaps for the elements and we add additional 2-2 gutters before to each elements.
The working demo: |
conclusion: I just would like this basic and common layout as reduced holes as possible with masonry |
I've just detected if we already have subtracks defined for paged media. (e.g. 1000 items in a masonry track separated to subtracks for each page) so this sounds a possible solution. |
The If you have use cases to add to #10233 btw, that would be super helpful! |
Currently, when we have a masonry layout with justify-tracks in dense mode, the elements overlap the hanging span-ed element. In ideal case this should apply the hanging element as well during justifying.
This affected with these values:
center
,end
,left
,right
,space-between
,space-around
,space-evenly
.it works well with
normal
andstart
values.Clarify this issue and honour hanging elements as well during justifying.
In the testcase the "2" element is the hanging one.
default case:
https://jsfiddle.net/utasir/mnuds6vz/1/
good for some reasons:

overlaps:

overlaps:

With this special testcase should be start<->center<->end, because width: max-content defined. But currently not. I didnot find any explanations for the span elements in the spec.
If dense is not defined, this issue still happens, but in my opinion that should be a different ticket
The text was updated successfully, but these errors were encountered: