Re: [css-ui] text-overflow in overflow:visible blocks

> On 13 Jan 2015, at 23:59, Tab Atkins Jr. <jackalmage@gmail.com> wrote:
> 
> On Tue, Jan 13, 2015 at 2:37 PM, Florian Rivoal <florian@rivoal.net> wrote:
>>> On 13 Jan 2015, at 22:34, Tab Atkins Jr. <jackalmage@gmail.com> wrote:
>>> But what
>>> happens if the line both overlaps the float *and* overflows the
>>> element?
>> 
>> I'd go with this:
>> 1) if 'text-overflow' is 'clip', you overlap and overflow, and the 'overflow' property tells you what to do with the overflow.
>> 2) if 'text-overflow' is something else, regardless of 'overflow', you ellipse the text if it overflows *the line box*. If there's a float, that means you ellipse before overlapping it, and if there isn't you ellipse to avoid overflowing.
>> 
>> (speaking of which, there is an extra problem with the current spec. The language about using the line edge is applied to all values, including the initial 'clip', and that's certainly wrong).
>> 
>>>  If you have visible overflow, it needs to be shown
>>> overflowing, right?
>> 
>> Not sure what you mean by that.
> 
> If you have an element with overflow:visible, it doesn't ellipsize the
> content when it overflows.  If you have a single very large word on a
> line, large enough to fill the entire line and overflow the element,
> the overflowing part is visible.  It's weird if overlapping a float
> changes that; imagine that *all* the lines overflow, and only some of
> them intersect a float; the intersecting ones would ellipsize and not
> be visible outside the element (past the float), while the
> non-intersecting ones would protrude out of the element.  Seems weird.

It wouldn't do that. I would ignore the 'overflow' property always, not just when dealing with floats. This would mean 'text-overflow:clip' would be poorly named (as nothing gets clipped when overflow is visible), but the behaviour would be sensible. I don't know about web compatible though.

 - Florian

Received on Tuesday, 13 January 2015 23:06:14 UTC