Re: Image-dislay status media query for reducing reflows

On Fri, 01 Jul 2005 00:08:38 +0300, David Woolley  
<david@djwhome.demon.co.uk> wrote:

[clip]
> HTML 4.0 introduced a replacement for IMG that does have stylable
> fallback contents.  Unfortunately browsers implemented OBJECT
> very badly.  In XHTML 2, almost every element can behave in this
> way, so styling alt attribute text is really a legacy issue.

But this fallback you mention has to be achieved within the HTML file,  
imagine doing this for every img element, how it would increase the file  
sizes.


On Fri, 01 Jul 2005 16:14:42 +0300, Lachlan Hunt  
<lachlan.hunt@lachy.id.au> wrote:

> Firstly, it's the alt *attribute*, not tag or property.  Secondly when  
> the image is not loaded and the fallback content is displayed instead,  
> it's not a replaced element and the 'height' and 'width' properties do  
> not apply to non-replaced inline elements.

Sorry, I always mix up those names (Nothing short of embarrassing on such  
a high-level discussion platform)

[clip]
>> (This is a bit different from images not being able to be loaded, when
>> the images are turned on, the UA should use images embedded size whether
>> it can load it or not)
>
> Why?  The reason for not loading the image is irrelevant to the question  
> how to render the content.

I just went for an easily definable property, but I have to agree with you  
a broader approach might benefit us more.
The slight problem with :fallback is that, for :fallback to be meaningful,  
it has to be in effect until the image loads, as you cannot know how long  
it would take to start loading that particular image in the document, and  
how long it would take for the UA to decide that it cannot be loaded. To  
decide that an error has took place in a dynamic enviroment like internet  
is very subjective. So that means, we can cause reflows for each element  
even if we gave the proper width and height embedded in the object or  
styled in CSS, if the :fallback bears a different size style.

Other solution to this would be to say that :fallback should only be  
effective after the browser decides that an image cannot be loaded, but  
for reasons I stated above, it is much easier to say if the user has  
turned off images or not, than to say that an error took place.

I, on the other hand, must stress that :fallback is NOT a bad idea at all,  
but it just is a different concept than what I present with image-display  
media query.

[clip]
> :fallback would be useful in many cases.  For example, an image with a  
> partially transparent background may be used in a document and, for  
> obvious reasons, it would probably not be desirable for the element to  
> have an opaque background colour.  However, when the fallback content is  
> rendered it may be desirable to provide a solid background colour to  
> make the text more readable.
[clip]

I see your point. But for that specific example, I have to say it would be  
nice if we would *also* have background-standin-color,  it is more likely  
people will keep their background info in their CSS, and background  
possibilities with CSS is much more than with <element src="back.png">  
(Correct me if I am wrong) I will rehash my older proposal, probably embed  
it in background-color so that  it will more appeal to everybody and will  
more suit CSS logic.


-- 
Emrah BASKAYA
www.hesido.com

Received on Friday, 1 July 2005 18:14:54 UTC