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

On Mon, Mar 30, 2009 at 3:28 PM, David Hyatt <hyatt@apple.com> wrote:

> \On Mar 30, 2009, at 10:43 AM, Brad Kemper wrote:
>
>
>> On Mar 30, 2009, at 8:23 AM, Tab Atkins Jr. wrote:
>>
>>  On Mon, Mar 30, 2009 at 10:05 AM, Brad Kemper <brad.kemper@gmail.com>
>>> wrote:
>>>
>>>>
>>>> On Mar 30, 2009, at 5:01 AM, Tab Atkins Jr. wrote:
>>>>
>>>>  On Mon, Mar 30, 2009 at 2:08 AM, Brad Kemper <brad.kemper@gmail.com>
>>>>> wrote:
>>>>>
>>>>>>
>>>>>> On Mar 29, 2009, at 9:50 PM, Andrew Fedoniouk wrote:
>>>>>>
>>>>>>>
>>>>>>> Sorry but border is not an outline either. E.g. outline does not
>>>>>>> participate in hits testing. But border does. How you border image
>>>>>>> solution will handle :hover state?
>>>>>>>
>>>>>>
>>>>>> Those are good questions. I suppose for simplicity anything outside
>>>>>> the
>>>>>> border-box would not participate in hit testing or hover testing.
>>>>>>
>>>>>
>>>>> This would also be a very good argument for still combining
>>>>> border-radius with border-image; border-radius will clip the hit box,
>>>>> which can be useful to match up with some border-image shapes.
>>>>>
>>>>
>>>> For hit-testing, yes. For clipping, no. If I have to chose between
>>>> hit-testing and not having my image clipped by the radius, then I prefer
>>>> the latter. Consider an images like these:
>>>>
>>>> http://www.bradclicks.com/cssplay/border-image/borders.png
>>>>
>>>> In each case, it would be useful to have border-radius for fallback, for
>>>> background-clipping, and for hit/hover-testing, but not for clipping the
>>>> border-image.
>>>>
>>>
>>> Certainly; I did not mean to imply otherwise.
>>>
>>
>> Actually, David Hyatt implied in a different thread a few days ago that
>> hit-testing was based fairly strictly on clipping, so I was also
>> incorporating that info into my reply to you, above. Maybe he could find a
>> way to clip the hit/hover-testing without clipping the border though, as you
>> and I would prefer.
>>
>
> This does raise the interesting question of whether the border image's
> (possibly larger) box should be considered for hit testing... or if it is a
> purely visual effect that should be completely ignored.


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.

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.


>
> I'm not really sure what the right answer is here.
>
> dave
> (hyatt@apple.com)
>
>

Received on Tuesday, 31 March 2009 00:05:01 UTC