Re: [csswg-drafts] [css-text] Prevent line breaking after explicit hyphens (#3434)

The CSS Working Group just discussed `Prevent line breaking after explicit hyphens`, and agreed to the following:

* `RESOLVED: Accept text for hyphenation in L3`

<details><summary>The full IRC log of that discussion</summary>
&lt;dael> Topic: Prevent line breaking after explicit hyphens<br>
&lt;dael> github: https://github.com/w3c/csswg-drafts/issues/3434#issuecomment-450610535<br>
&lt;dael> fantasai: I committed a set of changes to clarify what hyphenation is and when it's invoked.<br>
&lt;dael> fantasai: There were specific things we can do. Rec if a word contains a hyphen that breakpoint takes priority over auto hypen points. Could add no hyphens to L4. All this makes sense to me and wanted to ask WG what makes sense to do<br>
&lt;dael> astearns: Argument to put first into L3 instead of 4?<br>
&lt;TabAtkins> Whoops, sorry, I'm on IRC.<br>
&lt;dael> fantasai: Just spec a particular behavior. It wouldn't increase scope of l3. We can also not spec in L3<br>
&lt;TabAtkins> I can jump on phone to discuss the @charset thing.<br>
&lt;dael> florian: Adding no-wrap to hyphen in L4 would be helpful. Since I've done a talk on linebreaking people have asked for this feature.<br>
&lt;dael> florian: Priority on an actual hyphen over hpyenation I'm generally in support. There was a nuance brought up where in things like German you have [longword]-[longword] someone pointed out in some cases you might want to break middle of other words at high priority as well<br>
&lt;florian> https://github.com/w3c/csswg-drafts/issues/618#issuecomment-255135593<br>
&lt;dael> fantasai: So you prefer to break at another word and not hyphen if the break is close?<br>
&lt;dael> florian: Here's the comment^<br>
&lt;dael> fantasai: I can imagine if you have 2 long words you would allow hyphenation in them. but if auto hyphen point is 2 char from explicit hyphen you would want explicit hyphen. I'm not saying forbid the hyphen elsewhere, but encourage UA to use that break<br>
&lt;dael> florian: Trying to find some way around this for UA to do something smarter, either by keeping vague or we make it a must rule but if a-b is in the dictionary it can override and do what it wants<br>
&lt;dael> astearns: I think having a preference for the explicit hyphen but allow at other points, for a UA to make a decision it has to consider hyphenation points againt something else like a desired line break. A greedy linebreak algo will jsut pick the highest priority we spec for the longest line<br>
&lt;dael> fantasai: Greedy means fill the line as much as possible. Doesn't mean you can't say you prioritize breaks in that. Spaces win but a hypehn in 2 char of break works<br>
&lt;myles_> q+<br>
&lt;florian> q+<br>
&lt;dael> AmeliaBR: The desire is to keep some vagueness in rule for prioritization because it does end up around how many characters you will end up short. Spec has avoided strict hyphen algo so far<br>
&lt;astearns> ack myles_<br>
&lt;dael> myles_: The smarter we get on hyphenation and line breaking the more it seems to fit the text wrap multiline type thing<br>
&lt;dael> astearns: Given that we are discussing pro and con of spec explicit hyphen is desired I'm included to push to L4<br>
&lt;dael> florian: Need to say something in L3.<br>
&lt;myles_> what happened to text-wrap:multi-line? it isn't in the spec any more, but there are references to it if you search-in-page<br>
&lt;dael> fantasai: L3 spec if you break at punct it's rec you preform prioritization among your breaks. I don't think L3 needs to say anything more. It's not only allowed, but encouraged<br>
&lt;astearns> ack florian<br>
&lt;dael> fantasai: Happy to push to L4. If we want something in the spec I'll write it<br>
&lt;dauwhe> q+<br>
&lt;dael> florian: There's multiple ways. There's prioritization. There's also if you have a hyphen and disallow the rest. Even looking at German in the example this is allowed but not nice. Makes me think it's akin to line break where there's strict and loose.<br>
&lt;dael> fantasai: Okay<br>
&lt;dael> dauwhe: I'm fine with prioritization as fantasai wrote. I think that expresses all other things being equal we prefer to break at hyphen that's there, but there are other things algo need to consider<br>
&lt;dael> astearns: I think we need a resolution to accpe the current change. fantasai did you want a feeling of the group if those 3 items should be worked on in L4?<br>
&lt;dael> fantasai: Yeah. If we want to add to L4 I can edit those in<br>
&lt;florian> +1 for current change<br>
&lt;dael> astearns: First is accepting the changes in L3. Any objections to the current hyphenation text in L3?<br>
&lt;dael> RESOLVED: Accept text for hyphenation in L3<br>
&lt;florian> +1<br>
&lt;dael> astearns: More explicit rule on where to hyphenation when there is a n explicit hyphen. Objections to adding that to L4?<br>
&lt;dael> [silence]<br>
&lt;dael> astearns: So work on that<br>
&lt;AmeliaBR> aka the e-mail/T-shirt rule<br>
&lt;florian> +0 for hyphenate-limit-chars (no disagreement, just haven't thought about it, but go explore)<br>
&lt;dael> fantasai: There's don't hyphenate if there will be this many char before or after and proposal is to apply that to hyphens. You can't break if there's one character before or after explicit hyphen<br>
&lt;TabAtkins> e-<br>
&lt;TabAtkins> mail<br>
&lt;dael> astearns: Obj to add something in L4 around e-mail/t-shirt rule?<br>
&lt;dael> astearns: Hearing none, let's work on that.<br>
&lt;myles_> https://github.com/w3c/csswg-drafts/commit/a0c27afa0a50c462584511e617a20b687eb892af#diff-94819ad75aa15ba8049b412f93d8cc04<br>
&lt;florian> +1 for nowrap in L4<br>
&lt;dael> fantasai: Adding no-wrap to hyphens. None says don't do hyphenation but you can break at explicit hyphens. No-wrap says don'tbreak at explicit hyphens either<br>
&lt;dael> astearns: Obj to dealing with not wrapping at explicit hyphens in L4?<br>
&lt;dael> astearns: Let's work on that too.<br>
&lt;fantasai> https://drafts.csswg.org/css-text-4/#hyphenate-char-limits<br>
&lt;dael> astearns: One additional thing when talking about char limit. Does it make sense to have char limimt applyt o each segment in between explicit hyphens?<br>
&lt;dael> fantasai: Three values, required min for total char to hyphenate, min for char before hyphen, min for char after<br>
&lt;dael> astearns: Min for 3 char, you have 3 char, explicit hyphen, 2 char, hyphenation break. Is that allowed?<br>
&lt;dael> fantasai: Need to check<br>
&lt;dael> astearns: Not sure if that should be a thing or not. There are more then enough char before hyphen<br>
&lt;dael> fantasai: Yes, but if there wasn't a hyphen seems weird to break there<br>
&lt;dael> astearns: True. Maybe line length consideration needs the char<br>
&lt;dael> fantasai: THen you would allow to break after 2 char.<br>
&lt;dael> astearns: That's prob enough on this<br>
&lt;fantasai> s/char/char afte a space, too/<br>
</details>


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

Received on Thursday, 10 January 2019 00:36:52 UTC