Re: [css-ui] text-overflow: fade ?

On Thu, Oct 3, 2013 at 1:33 PM, Tab Atkins Jr. <jackalmage@gmail.com> wrote:

> On Thu, Oct 3, 2013 at 12:46 PM, Rik Cabanier <cabanier@gmail.com> wrote:
> > Wouldn't this be trivial to implement with masking and a linear gradient.
> > ie:
> > p {
> >   mask-image: linear-gradient(to right, rgba(0,0,0,1) 0%,rgba(0,0,0,1)
> > 80%,rgba(0,0,0,0) 100%);
> > }
>
> Now that we have CSS masking, the functionality itself isn't that hard
> to implement, yes.  But you can't tie it to text-overflow, which is
> the intended behavior.  If the text fits, you don't want it to start
> fading.
>

ah. Yes, that makes sense.

This sounds like a new pseudo-class ':overflow' :-)


>
> Note as well that any explicit masking like this won't be bidi-aware,
> and so will be on the wrong side in rtl text.
>

Received on Thursday, 3 October 2013 23:16:00 UTC