W3C home > Mailing lists > Public > www-style@w3.org > March 2009

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

From: Tab Atkins Jr. <jackalmage@gmail.com>
Date: Sun, 29 Mar 2009 23:48:26 -0500
Message-ID: <dd0fbad0903292148i51e9928sc13062d66be1fc25@mail.gmail.com>
To: Brad Kemper <brad.kemper@gmail.com>
Cc: David Hyatt <hyatt@apple.com>, Anne van Kesteren <annevk@opera.com>, Bert Bos <bert@w3.org>, "www-style@w3.org list" <www-style@w3.org>
On Sun, Mar 29, 2009 at 11:24 PM, Brad Kemper <brad.kemper@gmail.com> wrote:
>
> On Mar 29, 2009, at 8:51 PM, Tab Atkins Jr. wrote:
>
>> On Sun, Mar 29, 2009 at 2:40 AM, Brad Kemper <brad.kemper@gmail.com>
>> wrote:
>>>
>>> I written up a proposal that I think solves this problem, plus a couple
>>> others that I think are even bigger for authors. I'd appreciate it if
>>> everyone could take a look and let me know what you think. In the
>>> following
>>> link, I describe three problems (including this one), and a nice solution
>>> that I would love to see implemented:
>>>
>>> http://www.bradclicks.com/cssplay/border-image/Thinking_Outside_The_Box.html
>>
>> I think I am in love, Brad.
>>
>> Question: When would the first and second line of widths ever be
>> different?  In the original draft the second set of numbers specified
>> the border width, but what does it specify here?  A scaling factor?
>> In your examples they are always the same, so I can't tell.
>
> As before, they determine the CSS lengths that the images occupy, whereas
> the first set of numbers is the number of image pixels. This means that you
> could get higher resolution images into the borders by having more image
> pixels occupy an area of fewer CSS pixels, or you could use percentages, or
> ems, or cm, etc. in the second set of numbers. I don't think I changed
> anything there (other than to say the the CSS pixels in excess of the
> border-width would not affect layout), so others please correct me if I
> misstated that.

Ah yes, you're right.  Sorry, the fact that it changed the effective
border width in the original proposal made me forget that it also
scaled the image.

> I suspect in the vast majority of cases that authors would use them as I
> have, so it is somewhat unsatisfying to me to have to type them out in order
> to get to the third set of numbers. Perhaps the third set of numbers should
> be preceded by something other than a slash (a double slash maybe?), so that
> the second set can just default to 1 image pixel = 1px.

Perhaps we can just allow it to be omitted, but still require that
both of the slashes appear if you're specifying offsets?  So in the
final example it would look like:

border-image: url(Aladdins_Lamp.png) 4 125 141 44 // 0px 14px 12px
27px / stretch round;

I suppose this is basically identical to what you've said, except that
a single slash is still used when all elements are specified.  I don't
know if that's worth it; it may be better to just use a double slash
or whatever.

~TJ
Received on Monday, 30 March 2009 04:49:07 GMT

This archive was generated by hypermail 2.3.1 : Tuesday, 26 March 2013 17:20:17 GMT