Re: Proposal for clipping background images to foreground text

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 UTC