- From: CSS Meeting Bot via GitHub <sysbot+gh@w3.org>
- Date: Thu, 05 Jul 2018 01:05:11 +0000
- To: public-css-archive@w3.org
The Working Group just discussed `CSS Grid`, and agreed to the following: * `RESOLVED: The MBP of the subgrid plus the items in the first column that contains items are attached together to create a fake item which spans those columns in order to reserve space for the subgrid‘s MBP.` * `RESOLVED: Keep the rule in the spec which treats subgrid as an empty item which spans all of its spanned tracks, in addition` <details><summary>The full IRC log of that discussion</summary> <fantasai> Topic: CSS Grid<br> <fantasai> github: https://github.com/w3c/csswg-drafts/issues/2592<br> <fantasai> fantasai: This is about handling margins/borders/padding of the subgrid itself<br> <myles> ScribeNick: myles<br> <myles> fantasai: The previous rule we had didn’t work if your sub grid had some empty columns and things. We wanted to fix it. 2 solutions, i’ts about how strictly you tie the BPM to the outermost column when the columns are missing on the edges.<br> <myles> TabAtkins: Our current approach: the sub grid and its items are laid out in the parent grid independently but we take the sub grids MBP and apply the sum of their widths as magical extra margin on the appropriate edges of sub grid items that are in the first or last tracks<br> <myles> TabAtkins: So that they position themselves naturally as if they were inside the sub grid<br> <myles> fantasai: That also takes into account the grid itself. The problem is when there is no item on the side, we can attach the extra BPM to the item, then it takes the space.<br> <myles> fantasai: Then everything collapses away<br> <myles> fantasai: There are two approaches we have: 1) Strictly account for the margins and borders and padding in the track of the sub grid edge so even if the track is empty then we have a fake item that has the MBP fo the subgid attached to it.<br> <myles> fantasai: IT reserves space for the MBP and requires the MBP to be in this specific colum<br> <myles> fantasai: 2) Make sure the combination of tracks from the last track with an item in it has enough space for th MBP fo the subgrid<br> <myles> fantasai: Let’s say the subgrid has a really thick border. You could do *draws picture*. But in the other approach we would have to bump out the column to make it wider to fit the MBP. And then this track would be fully empty and we’ve got our item here<br> <myles> fantasai: The question: Do we want to use the tracks other than the last track to accommodate the MPB or do we want to force the MBP to be on the outer most track<br> <myles> Rossen: We discussed internally. Our idea: the one where MBP of the subgrid is accounted for in addition to whatever the items are in the first and last columns of the span of the subgrid. In other words, the subgrid acts as an item itself that spans all of the other items and the only thing that contributes is its MBP<br> <myles> fantasai: That was the original model, and it doesn’t work because if you treat it as an empty thing which spans all of them, then the MBP, like let’s say we have 2 items, the MBP could be handled, to be treated as a spanning item, so we could have MPB here and here, and we don’t’ have enough space<br> <myles> Rossen: When I said spanning, that was poorly chosen. I meant like a grid item spanning.<br> <myles> fantasai: We are treating MPB as an item. The spec said that MBP was an item wherever it ended up, but that doesn’t work if there are empty columns. Two alternatives: 1) Treat the MBP as being a grid item in the very last column only, or treat it as a grid item in all of the empty columns up until the last item<br> <frremy> q+<br> <myles> florian: In most use cases, you don’t have thick MBP, so most of the time the two will be the same<br> <myles> florian: But some time it might be and then solution 2i s nicer but more complicated<br> <myles> Fantasai: it’s not more difficult<br> <astearns> ack frremy<br> <Rossen> ack frremy<br> <myles> frremy: Optino 1 is not a good option because if the first one has as size of 5 pax and the border is 1 pax, you don’t want the track to change the size fo the grid overall.<br> <myles> frremy: I implemented just like Rossen said<br> <myles> Fantasai: If it’s a fixed size, you overflow, whoever, that’s your fault<br> <myles> frremy: But in the example, you still want the remaining 10 pix you can’t fit in the first one to fit<br> <myles> frremy: So i did exactly what Rossen mentioned, the grid was doing a layout itself with the layout fo the inner item.<br> <myles> frremy: In think you never end up in the case where the column is too small<br> <myles> Fantasai: the question we need to resolve is whether MBP can intrude into a column that is not the last column it spans<br> <myles> Rossen: agree<br> <myles> Rossen: What do people think?<br> <myles> TabAtkins: *head nod*<br> <myles> Rossen: Proposal: The sub grid will afford for its MBP by contributing its MBP to either the last column if it happens to be auto, or any other auto column of the main grid.<br> <myles> Fantasai: That’s way more complicated. Because then you can say, let’s say all the columns are auto, then this subgrid could fit within, if we allow it to intrude into this column which is empty int he subgrid, then the MBP could be accommodated without changing the size fo the column. But if we did what you said, then teh column would have to be pushed out.<br> <myles> Rossen: right<br> <myles> Rossen: This is slightly more complex.<br> <myles> Fantasai: The proposal in the issue is the MBP of the subgrid has to be accommodated int eh subgrid after the item it appears in<br> <myles> Rossen: This is the first option, right?<br> <myles> Fantasai: yes<br> <frremy> frremy: this means you account for the mbp independently on the four sides<br> <frremy> fantasai: yes<br> <myles> Rossen: Minimally account for the MBP by making sure that the combination of tracks from teh last track with an item in it to the edge fo teh subgrid has enough space to accomodate the subgrid‘ s MBP<br> <myles> Rossen: That is a worthy resolution, but this is the proposed resolution<br> <myles> florian: Clarification, what if there are multiple empty tracks, and all of them are auto, and the sum is too small, which do you grow?<br> <myles> Fantasai: You attach it to the last time.<br> <myles> S/time/item/<br> <myles> frremy: In the case where all the columns except the last one are fixed size .... so you do each side and the total<br> <myles> Fantasai: So you have a subgrid in the middle, and the subgrid is who knows well and this item is in here and we have a lot of columns. When we try to do all the sizing, the subgrid si going to contribute its items for sizing. This one does not get MBP attached because it’s’ not on the edge. But then we need to account for sub grid’s MBP, so we take this item, and we attach to this edge the MBP of<br> <myles> this subgrid item and treat this as an item which spans from this column to the edge of the subgrid<br> <myles> frremy: So we will still do a big one with all of the subrgrid<br> <myles> frremy: because if all the columns before are fixed size, you still may want to increase the middl ecolumn<br> <myles> Fantasai: But this guy can’t move, This item can’t leak into this column. So this column has to accomodate the item and the subgrid’ s MBP.<br> <myles> Fantasai: *draws on whiteboard*<br> <myles> frremy: *draws on whiteboard*<br> <Rossen> Example on the board: https://lists.w3.org/Archives/Public/www-archive/2018Jul/0004.html<br> <myles> Fantasai: The left side MBP can’t be accommodated here, and it will end up overflowing.<br> <myles> frremy: The way I wrote it, would be this would be there.<br> <myles> Fantasai: The content edge of the subgrid cannot be further to the right of the margin edge of the item.<br> <myles> frremy: But i fyou have 0 items, you have different behavior than if you have 1 item<br> <myles> Fantasai: but that’s the point. The item has to say in teh column in which its assigned. It can’t move<br> <myles> frremy: I would prefer it overflows the subgrid<br> <myles> frremy: The subgrid fits, but the item overflows.<br> <myles> frremy: I would do left side right side up side down side (hokey pokey)<br> <myles> Fantasai: I think that’s weird<br> <myles> frremy: but it’s better because it’s consistent<br> <myles> frremy: Most cases will do the same thing, its’ fine. your track will not change size when you add an item.<br> <myles> Fantasai: I see your argument, but I still think it’s super weird<br> <myles> Rossen: but the case you’re describing is weird<br> <myles> Fantasai: frremy: *repeats the arguments*<br> <myles> Fantasai: okay fine<br> <myles> Fantasai: we’ll figure it out<br> <myles> Rossen: Let’s capture this in a resolution<br> <myles> Fantasai: The case we’re talking about is when all the tracks of the subgrid from the edge of the subgrid all the way through and including the first track with an item are fixed size, and a track on the other side of the item is auto sized, then if the MBP of the subgrid is too big to fit within the fixed set of tracks, then it will cause an increase int eh size of the auto tracks anywhere on teh<br> <myles> other side, and will thus paint underneath the item and into that auto track rather than being attached to the outside fo the item and overflowing to the left<br> <myles> florian: so if that doesn’t fit there, but it fits there, you go underneath, but you don’t increase the size. But if you have to go beyond, then you increase the size to fit it there<br> <myles> Fantasai: that seems okay.<br> <myles> Rossen: This is more or less what I was suggesting<br> <myles> frremy: If you have a border you want the border not to be included int eh column of the item. The border should be outside.<br> <myles> Fantasai: That’s great, let’s’ resolve<br> <myles> Fantasai: We need 2 resolutions.<br> <myles> Fantasai: Proposed resolution: The MBP of the subgrid plus the items in the first column that contains items are attached together to create a fake item which spans those columns in order to reserve space for the subgrid‘s MBP.<br> <myles> Rossen: Did anyone follow tha tproposed resolution? Any objections?<br> <florian> +1<br> <myles> 10:38 myles: Fantasai: Proposed resolution: The MBP of the subgrid plus the items in the first column that contains items are attached together to create a fake item which spans those columns in order to reserve space for the subgrid‘s MBP.<br> <myles> RESOLVED: The MBP of the subgrid plus the items in the first column that contains items are attached together to create a fake item which spans those columns in order to reserve space for the subgrid‘s MBP.<br> <myles> fantasai: In addition, to accomodate the situations where the columns of the above item are all fixed, we do a calculation which allows that MBP to bleed through the first column with all the items in it and potentially expand an auto column on the other side<br> <myles> frremy: Proposal: Keep what’s in teh spec and add teh previosu resolution. Don’t replace what’s int he spec.<br> <myles> Fantasai: Cool<br> <Rossen> s/teh/the/<br> <myles> Fantasai: Resolution: Keep the rule in the spec which treats subgrid as an empty item which spans all of its spanned tracks<br> <Rossen> additional subgrid example: https://lists.w3.org/Archives/Public/www-archive/2018Jul/0005.html<br> <myles> Fantasai: Resolution: Keep the rule in the spec which treats subgrid as an empty item which spans all of its spanned tracks, in addition<br> <myles> Rossen: Any objections?<br> <myles> <silence><br> <myles> RESOLVED: Keep the rule in the spec which treats subgrid as an empty item which spans all of its spanned tracks, in addition<br> <emilio> ScribeNick: emilio<br> </details> -- GitHub Notification of comment by css-meeting-bot Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/2592#issuecomment-402578963 using your GitHub account
Received on Thursday, 5 July 2018 01:05:16 UTC