Re: [css-houdini-drafts] [css-layout-api] Removing `childDisplay: 'normal'` , and replacing with `childDisplay: 'inline'`. (#946)

The Houdini Task Force just discussed `Inlinifying layout`, and agreed to the following:

* `RESOLVED: Remove normal layout and replace it with "block" and inline" and add a note saying we will reintroduce normal layout later`

<details><summary>The full IRC log of that discussion</summary>
&lt;TabAtkins> Topic: Inlinifying layout<br>
&lt;myles> myles: what's the name of the API that enables this?<br>
&lt;TabAtkins> github: https://github.com/w3c/css-houdini-drafts/issues/946<br>
&lt;myles> iank_: the "child display type" can be either "block" or "inline". When you layoutNextFragment, you can layout linebox by linebox. In the fragment you have the inline size, box size, and &lt;missed> and that allows you to achieve all these effects<br>
&lt;myles> iank_: It's easy to do string-based layout when you blockify everything<br>
&lt;myles> iank_: Previously, we did normal child display, which didn't blockify. We think that's difficult to standardize, because all the engines do it differently, so we're proposing just inline-ifying everything<br>
&lt;myles> iank_: All the engines have a different way of splitting around block-level children and inlines. There's no consistency. This mitigates that problem.<br>
&lt;myles> heycam: Could those differences be exposed?<br>
&lt;myles> s/Could/Would/<br>
&lt;emilio> q+<br>
&lt;myles> iank_: Yeah, so, we, this was one of why we want to go down this path is it's quite difficult for us at the moment to not expose those differences. The way we build our box tree, children get squished down as a prepass to building the box tree. So, if we have something block-level inside something inline-level, it will get split into 3 pieces<br>
&lt;myles> emilio: When you have a block inside inline, you have to split into multiple things.<br>
&lt;myles> iank_: The engines don't agree on various edge cases here.<br>
&lt;myles> iank_: For example, if you've got only out-of-flow children, the engines handle the out-of-flow children and floats differently<br>
&lt;myles> emilio: That may be true<br>
&lt;myles> iank_: We didn't want to go down the rabbit hole by speccing everything<br>
&lt;myles> emilio: how do markers work?<br>
&lt;myles> iank_: &lt;misseD><br>
&lt;myles> iank_: You don't get a separate item from a list item at the moment<br>
&lt;myles> TabAtkins: Because it's explicitly inline?<br>
&lt;myles> iank_: yes.<br>
&lt;myles> emilio: What about an outside marker?<br>
&lt;myles> iank_: I think that will get wrapped in an anonymous block.<br>
&lt;myles> Rossen: What is the issue in the proposal?<br>
&lt;myles> iank_: To remove child display "normal" for now, and instead just do inlinification<br>
&lt;myles> Rossen: That makes sense for flow layout, but it doesn't make sense for anything else<br>
&lt;myles> iank_: YOu have to nest your custom layouts to get things like this<br>
&lt;myles> iank_: We have an explicit switch here which switches the display type. You can flip it to indicate you want to inline-ify your children<br>
&lt;myles> Rossen: So this just sets your content to be inline rather than block?<br>
&lt;myles> iank_: yes.<br>
&lt;myles> cbiesinger: What happens to block  children? DO tey become inline block?<br>
&lt;myles> iank_: yes<br>
&lt;myles> Rossen: In your example in the issue, the ABC followed by DEF ...<br>
&lt;myles> iank_: This would be represented as one child, with its children inline-ified<br>
&lt;myles> Rossen: Are you going to ignore &lt;missed>?<br>
&lt;myles> iank_: Yes, because it's ismpler.<br>
&lt;myles> Rossen: It makes no sense<br>
&lt;astearns> s/&lt;missed>/the display-outside value of the div/<br>
&lt;myles> iank_: It's the same as flexbox or grid blockifying. Just hte reverse.<br>
&lt;myles> Rossen: So how can display:block continue to be block?<br>
&lt;myles> iank_: You can't. You need two levels of custom layout. They must communicate internally<br>
&lt;myles> Rossen: That sounds complicated and unnecessary<br>
&lt;myles> iank_: It's simple to implement<br>
&lt;myles> Rossen: Yes, I know that. But the expectation is that I'd be able to handle flow layout in a fairly straightforward way for me, that restriction makes everything much harder<br>
&lt;myles> iank_: It depends on the use case<br>
&lt;myles> Rossen: Use case is normal CSS 2.1 support<br>
&lt;myles> iank_: If you just care about line grid snapping, this is what you want. You don't want to have to handle block level things<br>
&lt;myles> TabAtkins: We're not saying "you will never be able to do layout with block and inlines" but right now you have to pick either all block or all inline, because that's simpler.<br>
&lt;myles> dbaron: They both seem like reasonable options to have. Maybe it's worth having a note in the spec about reintroducing something else?<br>
&lt;TabAtkins> q?<br>
&lt;myles> majidvp: If we go wiht a simple model now, can we change the model later without breaking existing layouts?<br>
&lt;myles> iank_: Yes. To respect the display of the node, you would set the child display to be normal in a future version<br>
&lt;myles> dbaron: What layout capabilities do you have in inline content in this midel?<br>
&lt;myles> iank_: You can vary the given available space in the inline. You can shrink and expand how big the lines are (like the multicol layout)<br>
&lt;myles> iank_: The code for this is layout out many line boxes across the columns. You can also change how percentages resolve. You can also get the baseline information out. This one works by laying out the first two words with 0 available width, and then given available space to allow these other words to fix next to them, and then lay everything out with maximum available space<br>
&lt;myles> TabAtkins: Wouldn't that have a line break between "lorem ipsum"?<br>
&lt;myles> iank_: I have a non-breaking space between them<br>
&lt;myles> dbaron: It sounds like you've got a lot of control about the inputs and outputs of line layout, but nothing the internals of line layout<br>
&lt;myles> iank_: yes.<br>
&lt;myles> TabAtkins: Was this just an introduction, or do you want a resolution for this change?<br>
&lt;myles> TabAtkins: Proposed resolution: Remove<br>
&lt;myles> RESOLVED: Remove normal layout and replace it with "block" and inline" and add a note saying we will reintroduce normal layout later<br>
&lt;myles_> ScribeNick: myles_<br>
&lt;myles_> emilio: At which point does the simplification happen? If I put float:right in the div, do I get a div with floating style and display none?<br>
&lt;myles_> iank_: The float will switched to an intermediate line in this case, because we don't handle it<br>
&lt;myles_> emilio: Do you also modify the computed style, or just layout box<br>
&lt;myles_> iank_: The computed style, just like flex and grid<br>
&lt;myles_> emilio: No.<br>
&lt;myles_> TabAtkins: Flex and grid blockify at computed value time<br>
&lt;myles_> emilio: They don't add or remove float properties<br>
&lt;myles_> TabAtkins: Those don't apply<br>
&lt;myles_> cbiesinger: in chrome it modifies the computed style, but per spec it shouldn't<br>
&lt;myles_> iank_: For us, the computed style of target float is none<br>
&lt;myles_> iank_: Firefox logs "left" and Safari logs "none"<br>
&lt;myles_> &lt;silence><br>
&lt;myles_> iank_: abspos modes of custom layout don't exist<br>
&lt;myles_> emilio: We could specify it<br>
&lt;myles_> iank_: in that case, we don't need special handling<br>
&lt;myles_> emilio: They just don't appear in teh custom layout stuff, like normal out of flow<br>
&lt;myles_> cbiesinger: What static position do they get?<br>
&lt;myles_> iank_: They're block children, so the padding inline block. Whatever the standard static position of an internal line box<br>
&lt;myles_> cbiesinger: If there's a custom algorithm, how does it know where the static position is?<br>
&lt;myles_> iank_: It's the static position of the marker inside the element<br>
&lt;myles_> emilio: I think it depends<br>
&lt;myles_> koji: It may be more comlicated when teh containing block is inline, and we compute merged boxes<br>
&lt;myles_> iank_: It should be fine ...?<br>
&lt;myles_> iank_: If you've got out-of-flow inside inline, that position is somewhere in the line box. For the purposes of layout, it's just positioning line boxes. It doesn't care about out-of-flow children. When we then handle out-of-flow as a postpass, they are handled naturally<br>
&lt;myles_> koji: Static position is fine. I was thinking about when the containing block is inline ancestor and we have right currently<br>
&lt;myles_> iank_: In that case, the out of flow layout parts would pick up where those open span and close span is<br>
&lt;myles_> iank_: it might be easy if we just do this<br>
&lt;myles_> iank_: I can't spell<br>
&lt;myles_> iank_: It crashes. We currently don't handle that.<br>
&lt;koji> s/right currently/`right: 0`/<br>
&lt;myles_> Rossen: Are we still working through this issue? I think we should move on.<br>
&lt;myles_> iank_: okay<br>
&lt;myles_> TabAtkins: Before the next topic, who put WebAssembly integration on the agenda?<br>
&lt;myles_> TabAtkins: Does anyone have anything we want to hit first?<br>
&lt;myles_> TabAtkins: Font enumeration? property registrations?<br>
</details>


-- 
GitHub Notification of comment by css-meeting-bot
Please view or discuss this issue at https://github.com/w3c/css-houdini-drafts/issues/946#issuecomment-533359493 using your GitHub account

Received on Friday, 20 September 2019 00:44:04 UTC