-
Notifications
You must be signed in to change notification settings - Fork 711
[css-grid-3] Renaming masonry
keyword
#9733
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
Can you explain why you use |
I suggested "pack" because you're packing things into the grid as tightly as possible in that axis, instead of creating grid rows. Waterfall is a lovely name, and a better analogy than masonry imho! |
fwiw, I have only ever heard this referred to as masonry layout, and using the same topics measure that @yisibl provided, there are 151 repos on the masonry-layout topic vs the 28 for waterfall, kind of confirming to me that that is a more widely understood term... So, why not use it? Where did you overhear the conversation @fantasai and what about it should it cause us to change? I'm sure there's a reason, it's just not clear from the issue what it is. |
For non-native English speakers, |
To my mind, the |
The eponymous JS library by @desandro is being presented as "Cascading grid library", which is somewhat related to watefall metaphor too. But it seems to me that "masonry" already became a common name for that type of layout, for many non-native English speakers as well (for example, in the Russian-speaking community the word "masonry" is most often used without translation as none of the possible translations became prevalent). |
I'd recommend sticking with |
Let's finalize the naming as soon as possible, Safari seems to have shipped. WebKit/WebKit#24414 cc @nt1m |
@yisibl Safari hasn't shipped yet, let's not panic. :) |
@jensimmons points out that |
The longer I look into this, the more convinced I am that we can let go of the idea of "masonry layout" and instead embrace this framing:
Like Elika said, "Off" may not be the best word, but that's what I'm using at the moment. Please turn off the functionality that creates rows. |
Would there be value in re-using the |
I don’t mind However, if we were wanting a different metaphor that might be more universally recognisable, I'd suggest That said, I can also see the logic in ditching the metaphor and going with something more generic like |
I think I think the keyword should reflect the idea of the rows, or columns are not aligned each other. For example I'm thinking of this keyword as an initial setting, like For example, it could be possible to customize the size of the items: grid-template-rows: no-align;
/* Which is equivalent to: */
grid-template-rows: no-align repeat(auto-fill, auto);
/* To strech the elements so they are also aligned at the end */
grid-template-rows: no-align repeat(auto-fill, minmax(auto, 1fr)); This idea of configuring the size of the items can be implemented in the future if it's too complex. For now, simply |
“Masonry” has such a rigid meaning—set a brick in place and it stays put. It's a print-media mindset. I also think "masonry" would hamper adoption because of the legacy perception that strongly connects the word to the grid of images use case. Like masonry, “waterfall” is another metaphor. I think it would be better to use a term that declares a state rather than a metaphor. The underlying concept of waterfall is flow. “Flow” has established meaning in CSS so perhaps troublesome to use this way, but |
I was dubious about how masonry was even conceptually a kind of grid, but this quote from the article on webkit was useful in seeing the gridness of it. So:
Very explicit, no ambiguity or metaphor which might feel complex internationally, and no associations with what a masonry layout is 'for'. It's some kind of grid, but you turn the rows off. It's also less ambiguous than The idea of using & because the rows here aren't really behaving like rows - it's more of a kind of margin-between that can nevertheless be targeted as if they were rows. We wouldn't conceptualise a column of blog posts filling the whole span as 'each post is a row' or, a single plate on a shelf as 'a row of plates' in other contexts - a row implicitly has two or more objects in it, or a row is a horizontal relationship between things. ( There's also the way that align is used of vertical orientations in various contexts. Hopefully, masonry will be available for both rows and columns. It's a bit messy the way the orientation 'align' targets changes depending on how you're flexing. |
Commenting here as this is where the community conversation has been directed to, but I still have concerns with the idea of bundling Masonry in with grid. We'll have to account for masonry things in any future additions to grid, and there will be parts of grid that don't make sense in masonry and therefore need explaining as to why they don't work. Given that things like gaps and alignment are already dealt with in other specifications, and there's no reason not to re-use the various methods of sizing columns from grid, having a I'd also love to see Masonry (via any version of the spec) landed alongside |
After seeing the proposal of a different So I think a |
Heres some brainstorming: Bricks |
I quite like tiles Brick is also good Both are easy to type and are pretty basic and easy to understand. You can visualise both clearly and it's easy to understand what the intended result should be. |
I suggest: |
Please, mayby create an questionnaire like with nesting, to gather more votes on the matter. |
Either way, 👍 for renaming |
Any of |
Instead of specifying by what it is not, can we specify by what it is: |
This aligns well with my mental model of this type of grid as well. Commenting to suggest considering something like There are rows, but the rows are not forced to align and columns can have different numbers of rows within, as in a jagged array. https://en.wikipedia.org/wiki/Jagged_array |
When it comes to API design I like to remember the rule "make invalid states unrepresentable". With this rule in mind, applying masonry layout vertically/horizontally via .invalid-masonry {
display: grid;
grid-template-rows: off;
grid-template-columns: off;
}
/* invalid but still possible */ Therefore I’d argue for using a different display value like |
This is the best argument I have seen for creating a new display type. |
I still think leveraging display grid might be a nice trade-off 🤔 (For what is worth, I'm not a native English speaker) |
What a fascinating discussion to read. Jenn's article is a very compelling argument for including “masonry” (or whatever it will be called) in Grid, given how many options and combinations can be created. But having the likes of Rachel Andrew argue otherwise certainly gives me pause. At least we would have to modify how we explain Grid, as it will no longer strictly be a layout algorithm for columns and rows — although it's not too much of a stretch to add "unless you want to tightly pack elements along one axis" or something like that. This discussion is all in English, though, and we are a pretty privileged bunch getting to discuss which English word will be used for this. At least it should be something easy to understand and spell. Even I have trouble spelling “separate”, let alone “disintegrate” etc., which many people would have to learn to spell, remember and understand as a concept. Something like “off” is much simpler and to the point, even if you can argue it's not strictly true. Maybe “tight” would be an option, but then you get spelling and perhaps comprehension issues again. |
|
The keyword |
Hi ! Non-native english speaker here, after giving it some thoughts and reading the suggestions made by everyone, those words make the most sense to me :
Hope my two cents will help ! |
@jensimmons wrote in #9733 (comment) ...
How about |
I love this so much. I was coding the |
The more I read the various discussion points, the more I get the feeling that adding a whole other display type seems to be overkill. It's a whole other faction where we'd have to learn the nuances and differences (an argument could be made that masonry is closer to flexbox than grid due to it's unidirectional nature), and an avenue where maintenance efforts would be duplicated for those features which cross the types. Keeping everything within the grid reduces maintenance efforts, lessens the chance of inconsistent behaviors to due things not being maintained in both situations, etc. But I admit to not caring for the term "off" for some reason. Just seems clunky because you're really not turning them off but ignoring them instead. The term ignore seems more accurate to the nature of the effort.
|
As a graphic designer, the thing that makes more sense to me is to keep it into grid. Grids doesn't need to be two dimensional, the columnar grid @jensimmons mentioned makes the most sense to me. I was pretty convinced that the sintaxe of disabling the rows with
So I thought why not create a new property? .columnar-grid {
display: grid;
grid-template-columns: repeat(3, 1fr);
grid-axes: column; /* new property. Could accept both (default), column and row (or maybe inline and block) */
} The behavior should be similar to So if |
+1 @fantasai suggestion of Why
|
I showed my spouse the really interesting text-layout example from Jen Simmons' article (embedded below). She immediately said: "so, like a magazine." Up above "newspaper" was mentioned, but I understand not wanting to bring paper into the digital discussion. I do think Yes it's a metaphor, but it is a metaphor without a rigid visual definition. |
@nowthis — Maybe the confusion with "magazine" is that some magazines are laid out like this, but some aren't, so it isn't a specific reference to what we've been calling "masonry". |
As this is a lot about language, even though I'm not a native speaker, I know that even in my mother tongue, it can be really hard to come up with a good word to describe something properly, and sometimes the best word is missed, just because nobody thought of it. So I'll try to throw in some more suggestions and hope they're considered useful.
|
I'm surprised I haven't seen more mention of the the first two ideas @renet mentioned.
On a side note, I am partial to |
Leveraging an already existing keyword, content can also be |
Just here to drop |
As others have mentioned, for non-native english speakers the term I understand why |
Hey everyone, I’d like to throw in a couple of suggestions for the name of the Flex Grid:
Adaptive Grid:
I think these names better describe what the layout does and might be easier for a global audience to grasp compared to |
Hey everyone, I’d like to propose a different approach that keeps things simple without introducing too many new keywords and abstractions. We can activate the masonry layout by adding For example, setting The masonry layout is a one-dimensional grid, so it always has at least one row and column. This makes terms like Maintaining the concepts of rows and columns here is crucial because placement properties (place-justify, place-items) should work accordingly. Thanks for considering this idea! |
Quite a few people suggested or +1'ed |
I believe that the term pack is the most appropriate. This is because it is extremely easy to understand for developers familiar with grid layout. While the Masonry layout mechanism is one-directional, since it is implemented as part of the grid, developers are expected to adapt to the new functionality while maintaining the concept of two-dimensional layouts. By using the term Therefore, to correctly associate the actual layout method of the Masonry layout mechanism with the concept of an "automatic packing function" held by developers familiar with grids, it is most logical to use the term |
I had a thought regarding @jensimmons’s article:
Which made me think that a word like “flow” or “wrap” might describe the result? “Collapse” is also good. My other personal pref. is somehow setting “rows none” or “rows off” - a good approach but it’s unclear how to name that. |
I honestly think that since we already have some cases of misnamed things, we should just stick to a similar convention of misnaming. I think the "grid-template-" values should be "no-rows" or "no-columns" to create such a masonry layout just like we have the "background-repeat: no-repeat". We could also have something sort of descriptive like "grid-template-": do-not-create;" I also like the use of ignore. |
For the proposal of replacing metaphor to the term. In the article from the WebKit team it's mentioned that in graphic design there are grid types like Modular Grids and Columnar Grids. Currently the The property or value |
The reuse and repurposing of existing keywords make for a strong argument to use There's already:
To make the keyword the same and use
|
Just overheard a conversation suggesting that maybe
masonry
isn't the word we want, so opening an issue to track that suggestion. Maybepack
? Open to ideas, if we find one we like we can consider renaming it...The text was updated successfully, but these errors were encountered: