Re: [csswg-drafts] [css-text-3] Switch line-breaking handling of atomic inlines (#4949)

The CSS Working Group just discussed `Switch line-breaking handling of atomic inlines`.

<details><summary>The full IRC log of that discussion</summary>
&lt;astearns> topic: Switch line-breaking handling of atomic inlines<br>
&lt;astearns> github: https://github.com/w3c/csswg-drafts/issues/4949<br>
&lt;fremy> fantasai: we had defined atomic inlines to work like ideographic characters<br>
&lt;fremy> fantasai: but that is unfortunatley not web compatible<br>
&lt;fremy> fantasai: even if this would be a nicer behavior<br>
&lt;fremy> fantasai: but since forever, atomic inlines have allowed breaking opportunities<br>
&lt;fremy> fantasai: so we accepted our fate<br>
&lt;fremy> fantasai: but there are use cases for the correct behavior though<br>
&lt;fremy> fantasai: so there was a question of how to swtich to that behavior<br>
&lt;fremy> fantasai: line-break not being auto ===> atomic treated as ID<br>
&lt;fremy> fantasai: another option: wrap-before/after to control wrapping before a particular inline, so you could have values to prevent/avoid<br>
&lt;fremy> fantasai: one of them could be this smart behavior<br>
&lt;fremy> fantasai: so, do we want to introduce a switch of behavior toggle<br>
&lt;fremy> fantasai: and if so, which option?<br>
&lt;fremy> fantasai: an issue would be that this won't be very visible to most languages<br>
&lt;fremy> fantasai: and koji was afraid some people might set it, then have big effects for CJK languages<br>
&lt;fremy> fantasai: the other option is more targetted<br>
&lt;fantasai> s/big/subtle/<br>
&lt;myles> q+<br>
&lt;fremy> fantasai: but it has the downside you have to target each element independtly<br>
&lt;astearns> q?<br>
&lt;astearns> ack fantasai<br>
&lt;Zakim> fantasai, you wanted to ask if 'contain:layout' trapping scroll snapping is actually what we wnt<br>
&lt;fremy> florian: one other issue is that the line breaking properties currently don't exist anywhere<br>
&lt;fremy> florian: so adding new behavior to them is wishful thinking<br>
&lt;koji> +q<br>
&lt;xfq_> ack my<br>
&lt;fremy> myles: in all the ebooks that use images-as-text I have seen, they use a class on these images<br>
&lt;astearns> ack myles<br>
&lt;faceless2_> +1 to myles<br>
&lt;fremy> myles: so the rule to target them all is very easy<br>
&lt;astearns> ack koji<br>
&lt;fremy> koji: in the github issue, we said it's fine with the property, but we want a different feature<br>
&lt;fremy> koji: the proposal was to pretend that atomic inline was a line-breaking class<br>
&lt;fremy> koji: and as we discussed in other issues, we have to resolve the ambiguity between elements boundaries<br>
&lt;fremy> koji: and maybe that should be discussed in that context<br>
&lt;fremy> koji: I like that idea that was proposed on github<br>
&lt;fremy> koji: I talked to ICU people to see if that would be possible<br>
&lt;fremy> koji: but that didn't get an approval<br>
&lt;faceless2_> q+<br>
&lt;fremy> koji: so they suggested to pick a specific character instead<br>
&lt;fremy> fantasai: I'm fine with selecting one specific character we consider to be representative of ID<br>
&lt;fremy> fantasai: it would be confusing for people to have to pick on char<br>
&lt;fremy> fantasai: the mapping can be implementation detail<br>
&lt;fantasai> s/on/a/<br>
&lt;fremy> koji: i agree<br>
&lt;astearns> ack faceless2_<br>
&lt;fremy> faceless2: I agree with koji, that proposal is quite flexible<br>
&lt;fremy> florian: if this means we are going to prioritize implementing these properties, I agree<br>
&lt;fremy> florian: but this is a very useful case for us<br>
&lt;fremy> florian: and just pushing it to a new level doesn't do much for us<br>
&lt;faceless2_> We've implemented already I believe.<br>
&lt;faceless2_> pending testing, of course...<br>
&lt;fremy> myles: priority of the feature > stage of the spec<br>
&lt;fremy> myles: we should design the feature well, not worry to much about which spec level we put things in<br>
&lt;fantasai> +1<br>
&lt;fremy> florian: yes, but what we are wanting to do is tie this to a new property nobody implemented<br>
&lt;fremy> florian: and we don't know if that property itself will survive or still function in the same way<br>
&lt;fremy> myles: I think it's true, but if this happens, we can revisit later<br>
&lt;fremy> astearns: I agree with myles here<br>
&lt;fremy> astearns: also, it's very separate to how line-break works today<br>
&lt;fremy> astearns: this extra switch doesn't sound like very good design to me<br>
&lt;fremy> florian: ok, I rescind earlier's me comment<br>
&lt;fremy> astearns: sounds like we are in agreement to resolve to add one more value to wrap-before/after, which would specify which chararcter we want to emulate<br>
&lt;fremy> astearns: is that correcT?<br>
&lt;fremy> faceless2_: does that make sense as a single property?<br>
&lt;fremy> koji: yes, maybe we want only want property, a "wrap" shorthand<br>
&lt;fremy> fantasai: but he also mentioned that it was rather non-specific as a name<br>
&lt;fremy> fantasai: and could be confusing<br>
&lt;fremy> fantasai: also, this wouldn't encompass "wrap-inside"<br>
&lt;fremy> fantasai: but maybe "wrap-as: ideographic"<br>
&lt;fremy> koji: I like that naming<br>
&lt;fremy> koji: maybe we can have different ideas<br>
&lt;fremy> koji: but one nice thing is if you apply on an inline box, we can have each side apply to the first/last character of the inline<br>
&lt;fremy> fantasai: yes<br>
&lt;fremy> florian: I dont like wrap-as: avoid<br>
&lt;fremy> florian: maybe wrap-outside: ideographic/avoid ?<br>
&lt;fremy> fantasai: I like that<br>
&lt;fremy> fantasai: I am worried about changing the class of the chars though<br>
&lt;fremy> fantasai: because it also affects the breaking between first and second<br>
&lt;fremy> fantasai: so I would say "for the purpose of breaking before" the first character<br>
&lt;fremy> fantasai: (abc) + wrap-outside: avoid should not affect breaking between a and b<br>
&lt;fremy> koji: not sure I see what is wrong<br>
&lt;fremy> fantasai: because that is affecting the inside of the element<br>
&lt;fremy> fantasai: while we are trying to change the behavior outside<br>
&lt;fremy> koji: yeah i understood correctly<br>
&lt;fremy> koji: I have use case for that I think<br>
&lt;fremy> koji: elements never break, unless it's inline block<br>
&lt;fremy> myles: but this issue is about atomics?<br>
&lt;fantasai> https://www.w3.org/TR/css-text-4/#wrap-before<br>
&lt;fremy> fantasai: yeah but wrap-before applies to inlines too<br>
&lt;fremy> fantasai: so we need to define an effect for them as well<br>
&lt;fremy> koji: hence what I proposed<br>
&lt;fremy> fantasai: then I would prefer another property<br>
&lt;fremy> fantasai: I really don't find the proposal to change the breaking inside for changing the behavior outside<br>
&lt;fremy> astearns: and that would allows combinations too?<br>
&lt;fremy> fantasai: yes, but there is no combination that makes sense<br>
&lt;fremy> fantasai: (flex is special, and the others don't care about character class)<br>
&lt;fremy> fantasai: but if that's not possible to implement<br>
&lt;fremy> fantasai: then we need another property<br>
&lt;fremy> myles: yes, it's worth talking about implementatibility<br>
&lt;fremy> myles: when we compute the line breaking opportunities, we have a big string, and opportunities<br>
&lt;fremy> myles: the model we propose with before/after is not compatible with how line breaker work today<br>
&lt;fremy> myles: so I am in favor of a single property that works on both sides<br>
&lt;faceless2_> q+<br>
&lt;fremy> astearns: if it doesn't really make sense to have separate switches for both sides<br>
&lt;fremy> astearns: then a new property that affects both is better<br>
&lt;faceless2_> &lt;p>a &lt;span style="margin-left: 5em; white-space:pre>&amp;#0a;&lt;/span> b&lt;/p><br>
&lt;astearns> ack faceless2_<br>
&lt;fremy> astearns: correct?<br>
&lt;fremy> faceless2_: we had one use case where this didn't apply to an atomic inline<br>
&lt;fremy> faceless2_: (...)_<br>
&lt;fremy> fantasai: yeah, I don't think we were proposing to remove the properties alltogether<br>
&lt;fremy> fantasai: just that for the specific use case of atomic inlines, we should have a separate one<br>
&lt;faceless2_> My example above was a case where suppressing line-breaking before a non-atomic inline was useful - in that example we would want to prevent the break before the &lt;span>, due to the force break inside it.<br>
&lt;fremy> astearns: ok, so what I am hearing is support for "wrap-as" with values for atomic inline<br>
&lt;fremy> myles: and editors need to figure out interactions with the rest<br>
&lt;fremy> fantasai: I don't think it<br>
&lt;fremy> fantasai: .... is too difficult<br>
&lt;fremy> koji: what about the values? a string would be nice?<br>
&lt;fremy> fantasai: I am ok with the spec behavior described as that<br>
&lt;fremy> fantasai: but I would rather specify keywords<br>
&lt;fremy> fantasai: that would be map to some specific strings<br>
&lt;fremy> myles: was the proposal for the string to be a single char?<br>
&lt;fremy> myles: or "ideographic"<br>
&lt;fremy> koji: no, the char between quotes<br>
&lt;fremy> myles: then I think I agree with florian and fantasai<br>
&lt;fremy> fantasai: and I don't think people will even see this behavior as using ideographic<br>
&lt;faceless2_> -1000 to nomal<br>
&lt;fremy> florian: "normal"?<br>
&lt;fremy> astearns: doesn't mean much to me though<br>
&lt;fremy> fantasai: I think it's decent name; "normal" is ID just because<br>
&lt;fremy> fantasai: it happens ID is the best char to map to to have the desired behavior<br>
&lt;fremy> astearns: proposed resolution is to add "wrap-as" and values, details TBD later<br>
&lt;fremy> astearns: RESOLVED: add "wrap-as" and values, details TBD later<br>
&lt;fremy> florian: level 3?<br>
&lt;fremy> fantasai: no ^_^<br>
</details>


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

Received on Wednesday, 6 May 2020 15:06:22 UTC