S
Spartanicus
Steve Pugh said:I don't see anything pertaining to the img element there. Can you
point us at a more specific passage?
I'm said:If I set img {border: 10px solid red;} then I would expect that border
to be applied to the img element regardless of whether that element
contained a graphic or alt text.
A matter of opinion since it's not in the spec. I consider this
incorrect behaviour.
The ambivalence arises from a leftover shortcoming in the img construct,
using an object construct removes the ambivalence about how it should
behave:
<object data="picture.gif" type="image/gif" style="border:2px solid
red">Picture</object>
If the UA renders the text then it should render it sans border as
border is not an inheritable property.
I therefore submit that it is reasonable to apply the same expectation
to a situation where the <img> construct is used, but as I said, it's a
matter of opinion as it's not governed by the spec.