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

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.

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.

~TJ

Received on Thursday, 3 October 2013 20:34:10 UTC