Re: -webkit-background-clip:text and -webkit-text-fill-color?

On Thu, May 31, 2012 at 2:35 PM, Marat Tanalin | tanalin.com
<mtanalin@yandex.ru> wrote:
> 01.06.2012, 00:53, "Tab Atkins Jr." <jackalmage@gmail.com>:
>> On Thu, May 31, 2012 at 10:11 AM, Jared Wein <jwein@mozilla.com> wrote:
>>>  Has there been a proposal from the Webkit authors for -webkit-background-clip:text and -webkit-text-fill-color?
>>>
>>>  I think properties like these could be useful in other engines.
>>
>> -webkit-background-clip:text is the devil.  It's a very silly misuse
>> of background-clipping to accomplish a text fill.  I like this
>> functionality and think that we need it, but this particular
>> implementation of it is ridiculous.
>
> Are any plans or drafts available for that currently?

Not right now, no.  It's just something that we should obviously have.

>> -webkit-text-fill-color is, as far as I can tell, completely useless.
>> It does literally the exact same thing as 'color'.  I haven't looked
>> into our codebase to see what it actually accomplishes, but I think it
>> was just a cargo-cult addition from the SVG model to go along with
>> -webkit-text-stroke.
>
> AFAIK, `-webkit-text-fill-color` overrides standard `color`. This makes it possible to separately specify two different colors for browsers that do not support `-webkit-background-clip` (standard `color` property is used) and for browsers that do support it (`-webkit-text-fill-color` is used by browser instead of `color`) to keep text readable anyway.

Ah, good point.  It's still a completely idiotic property, but I see
why it exists now.  The correct way to do this is, of course, to have
a proper fill solution that ignores 'color' when it's specified.  The
super-dumb solution of using the background-clip property to hack a
text-fill is what made this necessary.

~TJ

Received on Thursday, 31 May 2012 22:37:47 UTC