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

David Hyatt wrote:
> On Mar 30, 2009, at 7:04 PM, Brad Kemper wrote:
> 
>> How about if for the pixels falling outside the regular border-box, 
>> only totally opaque pixels would be hit/hover targets, and all others 
>> would be considered a purely decorative effect? That would be the 
>> ideal, IMHO, as it would allow images of shadows, glows, clouds, puffs 
>> of smoke, etc. to be ignored as hit targets. Otherwise, if it is all 
>> or nothing for pixels outside the box, I would lean towards nothing, 
>> treating them as a purely decorative effect, like box-shadow.
> 
> My preference is that the border-image's box is just a decorative effect 
> and that hit testing should use the normal border box.  I would expect 
> even the border-radius to be included in such hit testing, and simply 
> assume that the border-image is conceptually going to follow that curve 
> closely (even if it isn't clipped when rendering so that it can produce 
> visual frills outside the curve).
> 
> I really get why you didn't want border-image to clip to the 
> border-radius now with this new proposal of yours.  I agree with that 
> now, with the understanding that hit testing should honor the 
> border-radius curve.  The idea behind border-image is that it *should* 
> match the original border shape, and that any pixels drawn outside that 
> shape should be purely for decorative effect.
> 
> I'm actually inclined to disallow negative offsets for the border-image 
> box now that I've thought about it some more, since there is no way an 
> inset box can actually respect the original border shape.  By 
> disallowing negative offsets, we'd help make that clear, i.e., that the 
> intent of expansion is for visual frills outside the original border 
> shape, and not to just draw some arbitrarily different shape.
> 
>>
>>
>> There's also the question of where outlines should render.
>>
>> Yes, these are interesting questions... automatically follow the 
>> contours of non-transparent pixels? Honestly, I think it would be 
>> perfectly reasonable if the outline just followed the original 
>> border-box, and was rendered somewhere above the border-image.
> 
> Yeah I agree.  I think the outline should just follow the original 
> border shape (including the border-radius if specified).

I've added
   # The area outside the curve of the border edge does not accept
   # mouse events on behalf of the element.
to the definition of 'border-radius' and
   # [portions of the border-image outside the border box] are
   # invisible to mouse events and do not capture such events on
   # behalf of the element.
to the definition of 'border-image-outset'. Please let me know if
this is acceptable.

~fantasai

Received on Thursday, 19 November 2009 20:14:03 UTC