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

On Apr 1, 2009, at 12:30 PM, Brad Kemper wrote:

>
> On Apr 1, 2009, at 9:41 AM, L. David Baron wrote:
>
>> On Sunday 2009-03-29 00:40 -0700, Brad Kemper 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 like this proposal, except the piece I'm not sure about is
>> the outside-the-border images part (the additional syntax that goes
>> after the second slash).  I'm not sure how important that
>> requirement is relative to the implentation costs of the extra piece
>> of syntax and handling another case that can cause pieces of an
>> element to appear outside the element's border box.  (Or, to put it
>> another way, is the desire for things that stick out really specific
>> to border-image, or is it just a general issue that ought to be
>> solved by negative margins?)
>
> Well, with a lot of decorative borders, there is a strong  
> rectangular element and then things that stick out of it, so it fits  
> well with this. Negative margins is more of a hack, in that they  
> make the whole box bigger, when really it is just an issue with the  
> border being in the wrong place.
>
> Also, I don't like the idea of using different margins and padding  
> and such than I would if images are not loaded or are turned off.  
> Even during load time, if a whole box became wider and taller during  
> the few seconds when large images loaded, that would look pretty  
> bad, and maybe even obscure other content.
>
> And thirdly, this would allow a background that still fit inside the  
> box, even if bits of the border (with alpha transparency) stuck out  
> into the margin or into other boxes.
>
> Surely there are cases where using positioning or negative margins  
> on some content will give a similar "breaking out of the grid" feel,  
> but I don't think those fit as well as just putting the irregularly  
> shaped border where you want it to fall along the grid-conforming,  
> rectangular box.

Yes, we've struggled with this exact problem at Apple with the iChat  
balloons.  We had to use all sorts of negative margin hackery that we  
could simply get rid of if this feature existed.

dave

Received on Wednesday, 1 April 2009 17:48:51 UTC