On Fri, Mar 16, 2018 at 12:39 AM, Harbs <[email protected]> wrote:

> That’s what the current TextOverflow bead does. It only works on elements
> which are display: block (which span is not by default).
>
> IMO using div here is not PAYG, but I’m finished discussing this as well.
> I thought changing Label from span to div was a simple change and not
> worthy of major discussion. It seems reasonable to specify x/y position,
> width, height, etc. on Label without changing the type (i.e. position:
> block). Either I’m not explaining myself well enough or we’re just going to
> have to agree to disagree.
>
> We *have* a component which encapsulates Span (i.e. HTMLText) so I don’t
> know what this fixation about keeping Label a span is all about, but
> whatever...
>
> I’m going to revert Label back to span and change the TextOverflow bead to
> explicitly set display: block even though I think it’s *less* PAYG. I do
> agree that this is not worthy of all this discussion.
>


Perhaps we can set display:inline-block for the span which renders the
Label?  Then you can set width/height etc. on it.

.spanInLabel {
    width:150px;
    display:inline-block;
}

Then you could do truncation like this (in a new bead):

.truncationBeadForLabel{
    overflow: hidden;
    white-space:nowrap;
    text-overflow:ellipsis;
}

Thanks,
Om




>
> Harbs
>
> > On Mar 16, 2018, at 7:18 AM, OmPrakash Muppirala <[email protected]>
> wrote:
> >
> > Have you tried text-overflow:ellipsis?
> > Ex: http://jsfiddle.net/Qhdaz/5/ <http://jsfiddle.net/Qhdaz/5/>
> >
> > Apologies if you have already considered this and rejected the approach.
>
>

Reply via email to