Re: [csswg-drafts] [css-rhythm-1] Avoiding accidental double spacing (#938)

The CSS Working Group just discussed `Line grid and tests`.

<details><summary>The full IRC log of that discussion</summary>
&lt;fantasai> Topic: Line grid and tests<br>
&lt;TabAtkins> ScribeNick: TabAtkins<br>
&lt;fantasai> github: https://github.com/w3c/csswg-drafts/issues/938#issuecomment-575499518<br>
&lt;TabAtkins> koji: we discussed quite a bit on issues for rhythm sizing last time two years ago<br>
&lt;TabAtkins> koji: as far as i understand, this issue was the most blocking for the feature<br>
&lt;TabAtkins> koji: Since then, Blink shipped LayoutNG. I didn't reimplement this in LayoutNG yet.<br>
&lt;TabAtkins> koji: Currently this test fails in all browsers.<br>
&lt;TabAtkins> koji: I don't see a way to solve this properly<br>
&lt;TabAtkins> florian: We talked about multiple solution for the double-sizing. What is the test assuming?<br>
&lt;TabAtkins> koji: We just have tests for rhythm-sizing in general.<br>
&lt;TabAtkins> florian: We have a spec, and tests; you fail because you don't ipmlement. That's normal, right?<br>
&lt;heycam> fantasai: what are the tests for? there's block step sizing and line step sizing<br>
&lt;TabAtkins> fantasai: Were the tests for block step sizing, or line step sizing?<br>
&lt;TabAtkins> koji: line step sizing<br>
&lt;TabAtkins> koji: Question isn't about that, tho. I have to admit that I've got not great confidence on how I understand this accidental double-spacing issue.<br>
&lt;rego> are these the tests? https://wpt.fyi/results/css/css-rhythm?label=experimental&amp;label=master&amp;aligned<br>
&lt;TabAtkins> koji: But if I understand correctly, florian and astearns consider this a critical blocking issue.<br>
&lt;TabAtkins> koji: From my perspective, any solution can't avoid accidental double-spacing in some cases.<br>
&lt;astearns> q+<br>
&lt;TabAtkins> koji: So if we say accidental double-spacing fundamentally breaks the feature, we're basically saying CSS won't have this feature. Is that correct?<br>
&lt;TabAtkins> florian: Problem here is we want a vertical rhythm where the lines are the same size, and what to do when you can't have that.<br>
&lt;TabAtkins> florian: So either you break the rhythm and let some lines get bigger, or you double size the line to keep the rhythm.<br>
&lt;TabAtkins> florian: Can't avoid one or the other. What you can avoid is double-size when you don't need them to be.<br>
&lt;TabAtkins> florian: So if we have a mode where we double-size some of the time, making sure it doesn't happen gratuitiously, or in a brittle UA-dependent way, is the essential issue.<br>
&lt;TabAtkins> florian: So it's not "we can never have double sizing", it's "we have to be careful and make double-sizing happen consistently and predictably"<br>
&lt;tantek> rather than "that would be bad", can you state the desired fallback behavior?<br>
&lt;TabAtkins> hober: Isn't there a third option?<br>
&lt;TabAtkins> hober: Enforce the rhythm, and let the line overlap slightly.<br>
&lt;TabAtkins> florian: I think it's a bad one, but yes.<br>
&lt;TabAtkins> hober: I think some would prefer that.<br>
&lt;TabAtkins> florian: Circling back to koji's question, we ahve multiple specs addressing this problem.<br>
&lt;TabAtkins> florian: My feeling is that the most realistic part of this story is block-step-sizing; easiest and least brittle.<br>
&lt;fantasai> TabAtkins: Not going to break your layout if all your blocks are slightly larger in one browser than another<br>
&lt;fantasai> TabAtkins: but very broken if every line is double-spaced<br>
&lt;fantasai> faceless2: This only applies when line-height is normal?<br>
&lt;TabAtkins> faceless2: This only applies when line-height is normal, correct?<br>
&lt;TabAtkins> florian: Different concepts here. block-step-sizing ahs the problem without line-height.<br>
&lt;TabAtkins> florian: So they overlap to varying degrees.<br>
&lt;TabAtkins> fantasai: I think neither of these specs should be actively tested or implemented yet; I don't think we have great consensus on this as the correct solution yet.<br>
&lt;TabAtkins> fantasai: block-step-sizing doesn't have this sensitivity to inline layout or font rendering.<br>
&lt;TabAtkins> fantasai: So I think we could point to a wpt revision that had those tests, but I don't think we shoudl highlight failures before we have agreement on the concept at all.<br>
&lt;astearns> q?<br>
&lt;TabAtkins> fantasai: I think we need to handle font fallback in a more robust way. I think there's a lot of work to do to solve rhythmic sizing well, and a lot of that is solving inline layout problem generally.<br>
&lt;TabAtkins> koji: We could just set line-height and it works, tho.<br>
&lt;TabAtkins> fantasai: Right, but baseline-to-baseline spacing is still inconsistent.<br>
&lt;TabAtkins> fantasai: So because we have this discrepancy, almost all the time we trigger the double-spacing.<br>
&lt;TabAtkins> fantasai: So we want to clear this up, make the lines naturally rhythmic, so then when we need to *interrupt* the rhythm with something significantly different we can invoke rhythmic sizing.<br>
&lt;TabAtkins> koji: True for Latin, I don't think it's true for CJK.<br>
&lt;faceless2> q+<br>
&lt;TabAtkins> koji: Really just want to know if we should even be thinking about imlementing right now.<br>
&lt;TabAtkins> fantasai: I don't think so, no. If you remove those tests, drop a link to the last revision with them into the spec.<br>
&lt;TabAtkins> koji: Ok. But even block sizing has these problems too.<br>
&lt;TabAtkins> fantasai: I don't think so, no. rhythmic sizing *will* increase the size of blocks sometimes.<br>
&lt;TabAtkins> koji: We will have the same problems as text tho.<br>
&lt;TabAtkins> florian: How?<br>
&lt;TabAtkins> TabAtkins: If we have rendering differences in line heights, and the block height is based on text content, we'll have the same UA-dependent differences!<br>
&lt;TabAtkins> florian: If you size with lh unit, then...<br>
&lt;TabAtkins> florian: Really my issue is just about line-step-height. I don't think it's about block-step-height, but if you think there is, go ahead and open an issue about that.<br>
&lt;Rossen__> ack astearns<br>
&lt;TabAtkins> astearns: Elika went over a bit of my comment, but if th efeature isn't in active dev, I think it's perfectly fine to remove tests from WPT. I just approved a PR to remove all the Regions tests for this reason.<br>
&lt;TabAtkins> astearns: I'd prefer if there *was* active development - I don't think this issue is a blocker to doing work at all.<br>
&lt;TabAtkins> koji: So I hear consensus to remove the tests, and add warning to line-height-step and line-grid; block-step is fine.<br>
&lt;Rossen__> ack faceless2<br>
&lt;TabAtkins> faceless2: RealObjects have implemented this; I can't speak for how well.<br>
&lt;Rossen__> ack fantasai<br>
&lt;Rossen__> ack faceless<br>
&lt;TabAtkins> faceless2: AH have an implementation as well.<br>
&lt;TabAtkins> faceless2: We've got it too.<br>
&lt;TabAtkins> faceless2: I think this is all about the differences in what line-height:normal means between impls.<br>
&lt;Rossen__> q?<br>
&lt;TabAtkins> TabAtkins: I'll note that the ".tentative" substring in the filename is designed for this - tests that shouldn't be considered normative yet, but are in development.<br>
&lt;TabAtkins> Rossen__: So current proposal is to remove tests, add warnings to line-height-step and line-grid.<br>
&lt;TabAtkins> myles: What will the warning say?<br>
&lt;TabAtkins> florian: In line-height-step it can link to this issue.<br>
&lt;TabAtkins> florian: For line-grid, there are concerns, but no issue yet.<br>
&lt;TabAtkins> astearns: I can add the warning.<br>
&lt;TabAtkins> astearns: "We haven't figured everything out yet, but don't try to ipmlement blind assuming it's stable. Please give feedback if you're okay with working on bleeding edge."<br>
&lt;fantasai> &lt;br><br>
</details>


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

Received on Thursday, 23 January 2020 11:24:39 UTC