W3C home > Mailing lists > Public > www-style@w3.org > May 2012

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

From: Tab Atkins Jr. <jackalmage@gmail.com>
Date: Thu, 31 May 2012 15:36:58 -0700
Message-ID: <CAAWBYDBU9WUu-=9=mrYEv=zdq-iiFQdTQVpCMpJJqczxerBwxQ@mail.gmail.com>
To: "Marat Tanalin | tanalin.com" <mtanalin@yandex.ru>
Cc: Jared Wein <jwein@mozilla.com>, "www-style@w3.org" <www-style@w3.org>
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.

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

This archive was generated by hypermail 2.4.0 : Monday, 23 January 2023 02:14:15 UTC