-
Notifications
You must be signed in to change notification settings - Fork 690
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
[css-grid-3][masonry] Drop next
value of masonry-auto-flow
#10232
Comments
I disagree, as I explained in #9988.
Please explain these problems. Sure, items close in document order can appear far away. But this can already happen with
I disagree. Also note that
And it's requested by authors: #10233 (comment) |
I don't understand your objection. masonry-threshold will get you the behavior of 'next' except in cases where the "change in size" isn't actually "small". It basically lets you choose the size at which the change in size it's no longer considered a "small". (If you set it to infinity, it gets you exactly the behavior of The problem with 'next' is that if you have a wide variation in sizes, e.g. some items 3x as tall as others, you will get the items stacking in very uncomfortable ways to follow sequentially. |
Consider a threshold of 10px. If we have three columns filled with
That doesn't seem to follow from the definition in #9328: "among all the columns within slack distance of the shortest column, place in the startmost" The 1st column will always be within an infinity distance from the shortest column, so all items will go into the 1st column. I guess the logic could be modified to:
I think that would really be the |
What would you use it for? Afaict there's no good reason to have a value greater than 100vmax. |
As I said, to have stability. 100vmax still doesn't guarantee that. In the example below, just expanding a (Edit: I got confused with the various viewport units, I was thinking of |
Yeah, I do think that the "infinity" value actually has reasonable use-cases, and so we should go ahead and make it easy to do with a dedicated keyword. (In |
The CSS Working Group just discussed
The full IRC log of that discussion<flackr> fantasai: we have this value for masonry auto flow, instead of finding the shortest column it keeps wrapping around regardless of the heights of the columns. If you have different height columns they can be placed very far apart because it doesn't consider their size<flackr> fantasai: it seems weird when you have slight variations in column height to jump columns (e.g. jumping to shorter column) so we had this idea for a threshold property to say if you're within some slack of other columns assume they're all the same <flackr> fantasai: since we have that functionality which needs more precise spec, this solves the same problems that next was trying to solve but better <flackr> fantasai: e.g. with a 100vh gap you probably don't want to do this next column behavior <flackr> fantasai: proposal is to drop the next value from masonry auto flow <flackr> fantasai: you can easily configure with a threshold <TabAtkins> +1 to all that <TabAtkins> (i do think an "infinite" keyword would be *useful* in masonry-threshold, but it's fine either way) <flackr> astearns: IIRC, you can do it with masonry-threshold but you have to do it with a hacky calc? <TabAtkins> `masonry-threshold: calc(infinity)` isn't terrible to write anyway <flackr> fantasai: we could add a keyword that's infinity, but i can't think of a good use case for this. Would like to see a use case for why you'd need this <flackr> astearns: any other comments? <miriam> q+ <fantasai> I can't think of a reason why you'd need anything greater than 100vmax <TabAtkins> I do have a use-case for actual infinity, but we don't need to talk about it here; it's a side-discussion from this issue. <flackr> astearns: oriol mentioned he's opposed to dropping it without a keyword but it seemsl ike it could be a separate issue <astearns> ack miriam <flackr> miriam: That could be a separate issue, oriol did add an example to the thread. The use case is if you want stability, e.g. to not have disclosure widget move columns <flackr> miriam: is that an issue if you can't choose some stable value? <flackr> fantasai: we need to solve the stability issue somehow. You wouldn't want giant gaps in masonry regardless. You wouldn't want weird column heights / stuff jumping around. I think stability is a different issue <flackr> miriam: makes sense <flackr> Proposed resolution: Drop the next value of masonry auto flow <flackr> RESOLVED: Drop the next value of masonry auto flow |
Edits were done here: 0ac5d9d |
This value seems to cause problems with accessibility except in cases where the sizes of items are very close; and those cases are probably better handled by the masonry-threshold idea (see #9328 ).
The text was updated successfully, but these errors were encountered: