Re: [csswg-drafts] [css-ruby] vertical-align on ruby bases (#4987)

The CSS Working Group just discussed `vertical-align on ruby bases`.

<details><summary>The full IRC log of that discussion</summary>
&lt;Rossen_> Topic: vertical-align on ruby bases<br>
&lt;Rossen_> github: https://github.com/w3c/csswg-drafts/issues/4987<br>
&lt;TabAtkins> florian: verticla-align on ruby bases, shoudl it do something?<br>
&lt;TabAtkins> florian: dbaron suggested a while back that it shoudln't<br>
&lt;TabAtkins> florian: This simplifies things later<br>
&lt;TabAtkins> florian: And afaict, no use-case for it having an affecting<br>
&lt;TabAtkins> florian: There's use-cases for aligning, but seems that selecting dominatn baseline works there<br>
&lt;TabAtkins> xidorn: Currently in FF it's implemented differently<br>
&lt;TabAtkins> xidorn: I think dbaron's point is that vertical-align would affect height of the base container<br>
&lt;TabAtkins> xidorn: An alternative is to say base container's size is based on ruby base *without* ver4tical-align applied<br>
&lt;TabAtkins> xidorn: Because vertical-align needs to apply only after line is fully laid out, otherwise you don't know where things hsould be<br>
&lt;TabAtkins> xidorn: So when drawing ruby you're still in progress of laying out line, so yo udon't know where it ends up anyway<br>
&lt;TabAtkins> xidorn: So I think we can just say base container ignores the base's vertical-align for sizing<br>
&lt;TabAtkins> florian: Then ver4tical-align just visually shifts it at the end?<br>
&lt;TabAtkins> xidorn: Yes. Taht's what ff currently does, doesn't seem to create lots of complexity\<br>
&lt;TabAtkins> florian: I think i'm okay either way<br>
&lt;TabAtkins> stantonm: I've never seen it in ebooks<br>
&lt;TabAtkins> Rossen_: So sounds like added complexity overall. Implemented in ff, but no real content use-cases. Perhaps we could skip?<br>
&lt;koji> q+<br>
&lt;TabAtkins> xidorn: I think FF's way isn't adding impl complexity.<br>
&lt;TabAtkins> xidorn: Makin it not do that would need some actual code to turn it off.<br>
&lt;Rossen_> ack fantasai<br>
&lt;TabAtkins> fantasai: What do yo umean by "vertical-align doesn't apply", it always applies?<br>
&lt;TabAtkins> florian: EVerything besides "baseline" value<br>
&lt;TabAtkins> fantasai: How's that different from any other value?<br>
&lt;TabAtkins> florian: They'd all shift together<br>
&lt;TabAtkins> fantasai: Not if they're different font sizes<br>
&lt;TabAtkins> fantasai: Two parts to vertical-align: what you're alinging, and what you're aligning to<br>
&lt;TabAtkins> fantasai: Could say baseline-shfit doesn't apply<br>
&lt;TabAtkins> fantasai: But that creates a discrpeancy<br>
&lt;TabAtkins> dbaron: I think elika's right, it's probably simplest to just say that vertical-align happens at the end, and still have all the existing rules to say what aligns to what<br>
&lt;fantasai> s/discrpeancy/discrepency, where we are already dealing with differing positions/<br>
&lt;TabAtkins> koji: Having trouble understanding the proposed resolution<br>
&lt;TabAtkins> koji: Haven't tested our impl yet. But if this doesn't have use-cases and there's no compat issues, is it reasonable to not define this in level 1?<br>
&lt;TabAtkins> Rossen_: My question was mostly if there are use-cases you're aware of<br>
&lt;TabAtkins> koji: None that i know<br>
&lt;TabAtkins> Rossen_: But also not disagreeing with elika and dbaron that this could just be a last step<br>
&lt;TabAtkins> Rossen_: You could wrap it in an inline-blcok and align it that way<br>
&lt;Rossen_> ack koji<br>
&lt;TabAtkins> fantasai: REal problem here is the top and bottom values, which are relative to the whole line<br>
&lt;TabAtkins> fantasai: Doesn't make a lot of sense for a base to align to the top of the line<br>
&lt;TabAtkins> fantasai: If we could say that those values are treated as baseline or something, that would be fine<br>
&lt;TabAtkins> fantasai: But everything else is fine; you're *always* vertical aligning text in a line<br>
&lt;Rossen_> ack fantasai<br>
&lt;TabAtkins> dbaron: And it needs to be clear that the anno moves with the base<br>
&lt;heycam> q+<br>
&lt;TabAtkins> xidorn: In verticla-align case, the anno doesn't move with the base. The anno is part of the anno container, it doesn't move with the base itself<br>
&lt;TabAtkins> florian: The position of the anno does dpend on where the base ends up being, unless we make an exception here to say that v-a is a visual thing<br>
&lt;TabAtkins> heycam: elika, you said v-a:top doesn't make sense.<br>
&lt;Rossen_> ack heycam<br>
&lt;TabAtkins> heycam: What if you wrap that on a span, is that equally nonsensical?<br>
&lt;TabAtkins> fantasai: I think v-a on a span around and on the container itself, don't see why that shouldn't work.<br>
&lt;TabAtkins> fantasai: Probably need some dfn for it tho<br>
&lt;TabAtkins> fantasai: But v-a:top on the *base* doesn't make sense, can't shift the base to the top if it has stuff on top of it that's supposed to grow the line<br>
&lt;TabAtkins> fantasai: So we probably want to define what edges are used for aligning the ruby container<br>
&lt;koji> q+<br>
&lt;dbaron> q+<br>
&lt;TabAtkins> fantasai: For for bases, just want to apply it as normal, except that top/bottom/center  (which are all relative to the line itself, not relative to the baseline) should be treated as 'baseline'<br>
&lt;TabAtkins> heycam: And what about v-a on an anno?<br>
&lt;TabAtkins> fantasai: I think they should align with respect to each other<br>
&lt;TabAtkins> florian: So no motivation for making it work, tho<br>
&lt;TabAtkins> fantasai: MOtivation is that, if it doesn't work, that's a special exceptional behavior already<br>
&lt;TabAtkins> fantasai: And you *still* have to vertical-align *anyway*. You can't not do that. "Removing it" is just preventing you from *altering* the alignment.<br>
&lt;Rossen_> ack koji<br>
&lt;TabAtkins> koji: Reason I prefer not defining v-a is that our current impl is pretty similar to wk, and in our layoutNG one, we're treating ruby base more similar to inline-block than inline.<br>
&lt;TabAtkins> koji: We wanna preserve our flexibility to make it more like inline boxes in the future<br>
&lt;TabAtkins> koji: If we make that change, this will affect how v-a works<br>
&lt;TabAtkins> koji: So unless there's an author need or compat issue, would prefer not to define this<br>
&lt;TabAtkins> florian: Reason I'm concered with not defining things, is that back to the first issue, there is a need for authors to control alignment and spacing.<br>
&lt;TabAtkins> florian: But if it works in some browsers, authors can depend on that, and we'll get frozen in behavior anyway. But v-a might not be that risky anyway.<br>
&lt;florian> q?<br>
&lt;Rossen_> ack dbaron<br>
&lt;Rossen_> ack fantasai<br>
&lt;Zakim> fantasai, you wanted to respond to koji<br>
&lt;Rossen_> q+ dbaron<br>
&lt;TabAtkins> fantasai: I think, to th eextent tha we can define where we intend to go, we should do that in level 1. Can mark it optional or at risk.<br>
&lt;TabAtkins> fantasai: But for people working on their impl or drafting from scratch, I think it's useful to know what we're aiming for, so they can make approparite decisions for the fruture.<br>
&lt;Rossen_> ack dbaron<br>
&lt;TabAtkins> dbaron: I'd add to that, since the beginning of this spec the idea is that ruby boxes act more like inlines than inline blocks. It was known at the time that this wasn't how Chrome/WK worked. We're N years down the path, and I'd prefer not to abandon that path over this issue.<br>
&lt;TabAtkins> dbaron: In response to elika's comment about v-a<br>
&lt;TabAtkins> dbaron: Talking about top/bottom/center, CSS2 has the idea of "aligned subtree", which defines what set of stuff that top/bottom/center *is*<br>
&lt;TabAtkins> dbaron: May want to adjust the dfn to include ruby annos, or might not. But should make it clear.<br>
&lt;TabAtkins> fantasai: agree<br>
&lt;fantasai> myles: Wrt 6 yrs ago Chrome / WebKit...<br>
&lt;TabAtkins> myles: In response to dbaron, we're interested in changing our impl to more closely align with the ruby spec<br>
&lt;fantasai> myles: We are interested in changing our impl to more closely align with CSS Ruby<br>
&lt;TabAtkins> florian: So do we have a proposed reoslution?<br>
&lt;TabAtkins> Rossen_: Hearing that v-a on ruby base/anno is independent of the container<br>
&lt;TabAtkins> dbaron: I think it's different fro different ruby parts<br>
&lt;dbaron> dbaron: we've been talking about bases<br>
&lt;TabAtkins> Rossen_: So let's scope to base. vertical-align affects bases same as any other inline box.<br>
&lt;TabAtkins> fantasai: Except top/bottom/center are treated as baseline<br>
&lt;TabAtkins> xidorn: Can we leave that unspecified?<br>
&lt;TabAtkins> koji: Is that due to current impls?<br>
&lt;TabAtkins> fantasai: All of the other values align the box wrt the line.<br>
&lt;TabAtkins> fantasai: But top/bottom/center align with respect to the line box.<br>
&lt;TabAtkins> florian: For the other values, you align things wrt each other, then wrap a line around them.<br>
&lt;TabAtkins> florian: For these three, you have to figure out th eline box, then shift relative to it.<br>
&lt;AmeliaBR> A test case if people want to look at what browsers currently do… https://codepen.io/AmeliaBR/pen/c3d360bb400822287b2650f607d66fec<br>
&lt;dbaron> dbaron: I'm not convinced there's circularity for top/bottom/center.<br>
&lt;TabAtkins> fantasai: And then the anno moves, changing the line size<br>
&lt;TabAtkins> xidorn: But the anno doesn't move<br>
&lt;TabAtkins> fantasai: For the other values it does need to mvoe tho<br>
&lt;TabAtkins> Rossen_: Xidorn says it doesn't move for any of the values, it's like relpos<br>
&lt;TabAtkins> fantasai: I disagree with that behavior<br>
&lt;TabAtkins> dbaron: Another proposal: v-a affects ruby bases like other inline boxes. We open another issue on top/bottom/center to deal with those.<br>
&lt;TabAtkins> florian: I don't disagree, but it doesn't answer Xidorn's question - layout or paint time?<br>
&lt;TabAtkins> fantasai: I think it should work by laying out the boxes, aligning them, draw the base container aroudn the aligned text. It can't work any other way<br>
&lt;TabAtkins> fantasai: Things shift relative ot each other based on teh dominant baseline anyway, no reason to not let v-a do the same<br>
&lt;TabAtkins> xidorn: ruby anno is positioned based on the base container and anno container base. *not* on specific bases.<br>
&lt;TabAtkins> xidorn: So that makes me thing v-a on the base shouldn't affect the anno position.<br>
&lt;TabAtkins> fantasai: So when doing layout, ignoring v-a. If you have three bases, all different sizes, you have to align them.<br>
&lt;koji> q+<br>
&lt;TabAtkins> fantasai: Then you have to draw a ruby base container. Which box do you draw around? All of them? Or all of them?<br>
&lt;TabAtkins> fantasai: Whichever, no reason not to v-a there too<br>
&lt;TabAtkins> dbaron: I think someobody needs to write down the steps for this<br>
&lt;TabAtkins> dbaron: In terms of sizing and positioning base container vs anno container, etc<br>
&lt;koji> q-<br>
&lt;TabAtkins> xidorn is also signing up<br>
&lt;dbaron> I wonder if we should continue the ruby issues on a more-APAC-timed call?<br>
</details>


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

Received on Thursday, 30 April 2020 21:59:55 UTC