Re: [csswg-drafts] [css-overflow-4] Ellipsizing of text in middle of string (#3937)

The CSS Working Group just discussed `[css-overflow-4] Ellipsizing of text in middle of string`, and agreed to the following:

* `RESOLVED: Start work on middle ellipsis in css-overflow-4`

<details><summary>The full IRC log of that discussion</summary>
&lt;fantasai> astearns: are we going to do this, or punt it?<br>
&lt;fantasai> SebastianZ: Longstanding thing I proposed 10 years ago, a way to crop content of an element in the middle instead of at the beginning or end<br>
&lt;fantasai> ... proposal went through some iterations<br>
&lt;fantasai> ... current idea is to make text-overflow a shorthand and introduce text-overflow-handling and text-overflow-position<br>
&lt;SebastianZ> https://github.com/w3c/csswg-drafts/issues/3937#issuecomment-1624382903<br>
&lt;fantasai> text-overflow = &lt;'text-overflow-handling'> || &lt;'text-overflow-position'><br>
&lt;fantasai> text-overflow-handling = auto | [ clip | ellipsis | &lt;string> | fade | &lt;fade()> ]{1,2}<br>
&lt;fantasai> text-overflow-position = [ start || end ] | middle<br>
&lt;fantasai> SebastianZ: we cover the current behaviors, plus cropping<br>
&lt;fantasai> SebastianZ: also outlined rudimentary algorithm later on<br>
&lt;florian_irc> q+<br>
&lt;kizu> q+<br>
&lt;fantasai> SebastianZ: anyone on the call have comments?<br>
&lt;astearns> ack florian_irc<br>
&lt;fantasai> florian_irc: my main concern here is the handling of bidi<br>
&lt;fantasai> florian_irc: in general, just like in start/end of line, should do visual cropping not logical<br>
&lt;fantasai> ... logical cropping is going to be having some strange cropping<br>
&lt;fantasai> s/cropping/questions/<br>
&lt;fantasai> ... in generalized case, including bidi, makes me worry<br>
&lt;fantasai> ... because when you chop start/end, clear what happens, but if you crop middle you have to move the other parts<br>
&lt;fantasai> ... suspect it's more complex than we wish<br>
&lt;astearns> ack kizu<br>
&lt;fantasai> kizu: I don't have any opinion on bidi, but ellipsing in the middle is something I've wanted for more than 10 years<br>
&lt;jfkthame> q+<br>
&lt;fantasai> kizu: Last time, there was concern about not allowing clipping in the middle<br>
&lt;fantasai> kizu: but still good way to do it, if it's exactly in the middle then author can position something interesting there<br>
&lt;fantasai> kizu: but this will require browser to know<br>
&lt;fantasai> kizu: other than that, lots of people want this<br>
&lt;fantasai> kizu: idk if in this issue or other, if we need an ellipsis in multiline<br>
&lt;fantasai> kizu: in our product we need this, but should discuss separately<br>
&lt;fantasai> kizu: but for single-line, a lot of use cases<br>
&lt;astearns> ack jfkthame<br>
&lt;fantasai> jfkthame: I still disagree with Florian that visual ellipsizing in the middle is the right approach for bidi<br>
&lt;fantasai> jfkthame: in most cases, the most important content will be the beginning of the text and/or the end of the text logically speaking<br>
&lt;fantasai> jfkthame: so those pieces should be preserved<br>
&lt;fantasai> jfkthame: I wonder if, given the complexity/uncertainty, is define middle as a feature but leave the behavior of bidi cases for browsers to experiment with initially<br>
&lt;dbaron> Scribe+<br>
&lt;fantasai> jfkthame: until we see what works in real-world use case<br>
&lt;astearns> ack fantasai<br>
&lt;SebastianZ> +1 to what Jonathan said.<br>
&lt;dbaron> fantasai: I ithnk this makes sense -- the question is whether there's implementor interest.  If so, we should spec it.<br>
&lt;dbaron> s/ithnk/think/<br>
&lt;dbaron> astearns: do you want to gate specifying on implementor interest?  Or should we start it, mark it at risk, and work on spec in parallel?<br>
&lt;fantasai> astearns: should we gate spec on implementer interest?<br>
&lt;fantasai> florian_irc: in this case, I think yes<br>
&lt;fantasai> florian_irc: we agree that this is hard, and we don't know enough to spec it<br>
&lt;fantasai> florian_irc: so even if we did spec it, we wouldn't be able to get interop-level detail<br>
&lt;fantasai> astearns: even if there's open questions, the majority of use cases aren't bidi<br>
&lt;andreubotella> q+<br>
&lt;fantasai> astearns: it's something devs need and have a use for<br>
&lt;florian_irc> q+<br>
&lt;astearns> ack andreubotella<br>
&lt;fantasai> andreubotella: Chromium has an implementation of ellipsis in the middle that they use for file selection<br>
&lt;fantasai> andreubotella: I don't know what it does wrt bidi, but they have an implementation<br>
&lt;astearns> ack florian_irc<br>
&lt;fantasai> florian_irc: even if not bidi, there's still ambiguity wrt visual or logical middle<br>
&lt;fantasai> florian_irc: if non-monospace font, where is the middle?<br>
&lt;fantasai> florian_irc: effect of disagreeing will be less dramatic, but still will have disagreement<br>
&lt;SebastianZ> q+<br>
&lt;fantasai> florian_irc: but maybe useful enough to spec<br>
&lt;fantasai> florian_irc: would prefer to wait until interest, but not an objection<br>
&lt;astearns> ack SebastianZ<br>
&lt;fantasai> SebastianZ: There was at some point an implementation in XUL<br>
&lt;fantasai> SebastianZ: but they removed it at some point<br>
&lt;fantasai> dholbert: we replaced it with another hack based on HTML+CSS<br>
&lt;astearns> ack SebastianZ<br>
&lt;fantasai> dholbert: we have something, but idk how good it is. Similar to Chromium<br>
&lt;fantasai> astearns: given that there does appear to be something implemented, is that enough?<br>
&lt;fantasai> fantasai: can't speak for Apple, but doubt we'd object<br>
&lt;fantasai> jfkthame: unsure when we'd get to it, but some interest<br>
&lt;fantasai> jfkthame: we know that what we've got doesn't handle i18n well<br>
&lt;fantasai> jfkthame: and partly lack of a spec has discouraged us from being more thorough about integrating with CSS<br>
&lt;fantasai> astearns: I'm inclined to resolve that we start the spec of this, knowing it will be complicated, and it may take awhile<br>
&lt;fantasai> florian_irc: Do we start with SebastianZ's proposal of two longhands?<br>
&lt;fantasai> astearns: seems like a good place to start<br>
&lt;fantasai> fantasai: probably need to bikeshed -handling at some point<br>
&lt;fantasai> astearns: proposed to start?<br>
&lt;fantasai> RESOLVED: Start work on middle ellipsis in css-overflow-4<br>
</details>


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


-- 
Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config

Received on Wednesday, 24 April 2024 15:19:31 UTC