Editorial nits for in-tree masonry spec
Categories
(Core :: Layout, task)
Tracking
()
| Tracking | Status | |
|---|---|---|
| firefox83 | --- | fixed |
People
(Reporter: dholbert, Assigned: dholbert)
References
Details
Attachments
(3 files)
Filing this bug to make some editorial nits to the currently-in-tree CSS Masonry spec (an extension to CSS Grid).
| Assignee | ||
Comment 1•5 years ago
|
||
(For now, I'll just edit the bikeshed source; we can update the generated HTML in a one-off patch at the end.)
| Assignee | ||
Comment 2•5 years ago
|
||
| Assignee | ||
Comment 3•5 years ago
|
||
Actually, bikeshed's easier to set up than I expected (yay pip), so I'll include changes to the generated HTML in each patch after all.
Comment 4•5 years ago
|
||
FYI, you don't need to install it. You can generate the HTML like so:
curl https://api.csswg.org/bikeshed/ -F file=@layout/docs/css-grid-3/Overview.bs -F force=1 > layout/docs/css-grid-3/Overview.html
(And if you forget it it's documented in the first commit message so you just have to hg log -l 1 -v layout/docs/css-grid-3/Overview.bs to get it.)
| Assignee | ||
Comment 5•5 years ago
|
||
Depends on D93587
| Assignee | ||
Comment 6•5 years ago
•
|
||
Something that needs a bit of prose written to clarify:
6.2.
[...] Any item can opt out from stretching by setting align-self / justify-self to something other than normal or stretch in the relevant axis.
We should say what the varying behavior is for these other align-self/justify-self values, in this scenario with align-tracks:stretch. e.g. if an item "opts out" by doing align-self:center, does that mean we still allocate it space and then center it within that space (rather than stretching it)? Or do we just not allocate it any stretch space at all?
Items with a definite size don’t stretch and items with an auto margin in the masonry axis stretch by increasing their margin(s) instead of their content-box size.
What about an item that has a definite size and an auto margin in the masonry axis? (The two statements here conflict on whether or not those items would stretch in some way.)
| Assignee | ||
Comment 7•5 years ago
|
||
And a bit earlier, at the end of the section 6: intro
https://hg.mozilla.org/mozilla-central/raw-file/tip/layout/docs/css-grid-3/Overview.html#alignment
By default, the masonry box is the same as the grid container's content-box due to being stretched.
This is true in simple cases, but it's not true if there's overflow -- i.e. if the grid container has a fixed size in the masonry axis and there's more content stacked in that axis than fits. In that scenario, the masonry box extends to the end of the furthest item, whereas the grid container's content box is only as large as the specified size.
Perhaps this sentence needs further caveats, or should just be removed?
Comment 8•5 years ago
|
||
Other values (other than stretch and baseline values) are all treated as start and thus have no effect.
Definite size and an auto margin will grow their margin. The intended meaning of "Items with a definite size don’t stretch" is "Items with a definite size don’t stretch their size".
Comment 10•5 years ago
|
||
In regards to stretching with multiple auto-values: I think CSS2 says which values are ignored in that situation. We follow that.
| Assignee | ||
Comment 11•5 years ago
|
||
Depends on D93619
Updated•5 years ago
|
| Assignee | ||
Comment 12•5 years ago
•
|
||
One more spot that might need a tweak to the prose:
Absolute Positioning
The containing block is the extent of the tracks the item spans in the grid axis and the position of line 1 and the padding-box edge in the masonry axis.
I'm not sure what the definition for the masonry axis is saying here ("the position of line 1 and the padding-box edge")
Which padding-box edge? The end-edge, I'm guessing? (i.e. are you saying the containing block extends from line 1 to the end of the grid container's padding box?)
If so: it should say "end-edge"; and I think it also might need s/the position of/the area between/, perhaps?
| Assignee | ||
Comment 13•5 years ago
|
||
I updated part 3 to address comment 6 and 7; hopefully I interpreted your thoughts correctly on those.
(I addressed comment 7 by focusing on the example rather than making a blanket declaration, and by adding a caveat about what would happen if the masonry box were larger. And I rephrased the text about auto margins and stretching to hopefully make things clearer.)
Comment 14•5 years ago
•
|
||
Which padding-box edge? The end-edge, I'm guessing?
Yes.
If so: it should say "end-edge"; and I think it also might need s/the position of/the area between/, perhaps?
Well, at this point we're talking about a single axis so "the distance between" might be better. Or, "the area between" could be used at the start of the sentence in a way so that covers both axes ... somehow?
EDIT: I think it's clear that we're defining an area here though, since the sentence starts with "The containing block", so I think just defining the edges in each axis is probably enough without explicitly mentioning "the distance between" those edges.
Comment 15•5 years ago
|
||
| Assignee | ||
Comment 16•5 years ago
|
||
(BTW, the patches that landed didn't end up including a tweak to address comment 12/14 at this point. I'd rubberstamp a patch to address that if you want to post something, though. Otherwise, trying my best to stay away from my source tree & bugmail for a little while. :) )
Comment 17•5 years ago
|
||
| bugherder | ||
https://hg.mozilla.org/mozilla-central/rev/26de37d3d1fc
https://hg.mozilla.org/mozilla-central/rev/158d4f42f599
https://hg.mozilla.org/mozilla-central/rev/95aca7dd3567
Description
•