Re: [Backgrounds/Borders] What to do when a border-image fails to load

On Apr 1, 2009, at 1:52 PM, "Tab Atkins Jr." <jackalmage@gmail.com>  
wrote:

> On Wed, Apr 1, 2009 at 2:14 PM, fantasai <fantasai.lists@inkedblade.net 
> > wrote:
>> Brad Kemper wrote:
>>>
>>>> border-image: url(Aladdins_Lamp.png) 4 125 141 44 // 0px 14px 12px
>>>> 27px / stretch round;
>>>
>>> Yes, that works for me (except no third slash before the "stretch  
>>> round"
>>> part). Note that currently in the WD, omitting the second set of  
>>> numbers
>>> means that the image border width will be equal to the border- 
>>> width property
>>> value, which is much less useful that just having a 1 to 1  
>>> correspondence
>>> between image pixels and CSS pixels.
>>
>> It depends on what you're trying to do and whether you're using  
>> vector
>> images or not. If you want to give the border some texture but not  
>> to give
>> it shape, then you'd want to match the border-width. I can see the
>> usefulness of an easy way to say "use the intrinsic size", but I  
>> think
>> there should also be a way to say "use the given border-width".
>>
>> I'll note that we probably also want to allow percentages for the
>> border-image widths here.
>
> How difficult is it to have a keyword *or* a set of lengths there?
> Just slap in "intrinsic" and "border" (with "intrinsic" being the
> default when nothing is specified), and we've got it.

By Jove, I think you're right! If a border-width is set, then those  
are the only two values I can think of needing, unless I'm missing  
something.

>
>
> Taking it just a touch further, make *each length* replacable by one
> of those keywords.  That way you can, say, have the sides take on the
> border-width, while the top and bottom take on specified, or
> intrinsic, widths.  If there are less than four length/keywords, the
> missing ones are inferred the normal way (L take R, B takes T, R takes
> T).

I can't think of any reason why you'd ever need to take it that far.  
The main advantage of not just using intrinsic image widths for  
patterns is so that you can use the same image for multiple border- 
widths (if you had a favorite dash pattern you liked to use, for  
instance). Otherwise, if you've got an image width for the top and  
bottom, you can just make the sides the width you want too.

> Agreed on percentages.  I'm not certain why border widths ever dropped
> support for percentages.

I didn't even realize they had. Probably because of height. But if  
border-width percentages were always based on percentage of used width  
(online progression), it should be OK. 

Received on Wednesday, 1 April 2009 21:37:47 UTC