Re: [css3-gcpm] Controlling alignment of leaders

On Mar 28, 2011, at 21:14, Brad Kemper wrote:

> On Mar 28, 2011, at 10:58 AM, Bert Bos <bert@w3.org> wrote:
> 
>> Thinking a bit more about that: I might also want a double-headed arrow.
>> 
>> The following works, using the attached arrow image:
>> 
>>   span::after {
>>       content: leader(" ");
>>       border-image: url(arrow1.png) 0 58 / 0 0.5em;
>>   }
>> 
>> ... but it is not so convenient if I want to change the color.
> 
> That can be worked around. Supposing your background is normally solid white, you can use an image that is solid white with a transparent hole cut in it (the hole would be the shape of what was black in your attached image). Then set a background-color in the CSS to show through that hole. 

As I said: not so convenient. :-)

Now you can change the text color, but not the background. Still, it's a clever trick. Have you written it up somewhere?



Bert
-- 
  Bert Bos                                ( W 3 C ) http://www.w3.org/
  http://www.w3.org/people/bos                               W3C/ERCIM
  bert@w3.org                             2004 Rt des Lucioles / BP 93
  +33 (0)4 92 38 76 92            06902 Sophia Antipolis Cedex, France

Received on Monday, 28 March 2011 19:54:49 UTC