- From: Florian Rivoal via GitHub <sysbot+gh@w3.org>
- Date: Thu, 05 Apr 2018 02:30:08 +0000
- To: public-css-archive@w3.org
The browser is not allowed to overflow if there are "allowed" wrap points, but it isn't quite "must wrap here" because it there are several allowed wrap points, the browser is given some discretion about prioritizing them differently, and choosing which one of them it wants to wrap at. https://drafts.csswg.org/css-text-3/#line-break-details gives an example: > UAs that allow wrapping at punctuation other than spaces should prioritize breakpoints. For example, if breaks after slashes are given a lower priority than spaces, the sequence "check /etc" will never break between the "/" and the "e". so wrapping between / and e is allowed, but it is only required if that's the only possible wrapping point in the line. So, back to Richard's original point, if you want to be strict about the spec's interpretation, this is somewhat hard to test, as allowed wrap points can be ignored by the UA when there are other allowed wrap points that it chooses to prioritize. So to check that a browser allows a break where it is supposed to, you need to craft a situation where not only the line could be wrapped there to avoid overflow, but also where this is the only place where you can possibly wrap. The downside is that a poor implementation of priorities could result in most of the wrapping opportunities introduced by loose being ignored so long as there's another one on the line, which is not the intended effect. I guess we could require that these allowed wrap points be considered at a high priority, but since we don't define how priorities work precisely, that seems trick. For now, I suppose that this is what tests can rely on: > The precise set of rules in effect for each of loose, normal, and strict is up to the UA and **should follow language conventions** It would not follow language conventions to down prioritize these break so much that they are ignored when any other break is possible. But that limits all such tests to be flagged as "should" tests only. -- GitHub Notification of comment by frivoal Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/2450#issuecomment-378802711 using your GitHub account
Received on Thursday, 5 April 2018 02:30:22 UTC