W3C home > Mailing lists > Public > www-style@w3.org > April 2008

Re: Proposal for clipping background images to foreground text

From: Brad Kemper <brkemper@comcast.net>
Date: Fri, 4 Apr 2008 08:29:00 -0700
Message-Id: <2AAD74D8-963A-42A4-8EC7-E95C7DE4B690@comcast.net>
Cc: David Hyatt <hyatt@apple.com>, www-style@w3.org
To: fantasai <fantasai.lists@inkedblade.net>

On Apr 3, 2008, at 10:06 PM, fantasai wrote:

> David Hyatt wrote:
>> Yeah, I think a new property like text-fill (that does most of  
>> what backgrounds do) might be better than what I've implemented.   
>> In WebKit, I've already split text drawing into filling and  
>> stroking (with a separate text-fill-color property).  If that fill  
>> color became part of a larger shorthand, that might work.
>
> Well, the point of the separate color is for it to behave as a  
> fallback
> if the image fails to load. text-fill-color implies to me that the  
> color
> will always be applied.

With backgrounds, it is a fallback if the image isn't available, or  
it can show in places where there is no image (due to no-repeat, for  
instance, or partial image transparency.

I don't see any reason for there not to be a a "text-fill" shorthand  
that combines "text-fill-color", "text-fill-image", text-image- 
position", "text-fill-repeat", and "text-fill-attachment". Basically  
a direct equivalent of background. You could still have "color" as a  
fallback for UAs that didn't support "text-fill". Am I missing  
something?

I don't think I would want it to apply to the text-shadow though.  
That would be really inconsistent with the way color normally works  
on text.
Received on Friday, 4 April 2008 15:29:59 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Monday, 27 April 2009 13:55:04 GMT