W3C home > Mailing lists > Public > www-style@w3.org > June 2005

Re: FAQ about reasons behind CSS

From: Laurens Holst <lholst@students.cs.uu.nl>
Date: Thu, 30 Jun 2005 12:38:21 +0200
Message-ID: <42C3CB9D.2090100@students.cs.uu.nl>
To: Emrah BASKAYA <emrahbaskaya@hesido.com>
Cc: "www-style.w3.org" <www-style@w3.org>

Emrah BASKAYA schreef:
> I read the faq, thanks.
> 
> About the reflows, I have to repeat my question that doesn't get 
> answered  here. Images cause reflows all the time, and specs say giving 
> image sizes  is not necessary. How is does this bode with the 'no 
> reflow' motto?

I’d say it is not as much ‘no reflow’ as ‘as little reflow as possible’. 
Reflows are not technically impossible, they’re just undesirable.

Actually, you will see in many HTML documents that people very often 
specify image sizes, just *because* it elimites the "snap" after a 
reflow (especially when an image is recurring, e.g. part of the 
navigation). The removal of reflow is apparantly enough incentive for 
people to take the effort to specify the dimensions.

Just a bold statement: I’d say that there are more images with specified 
dimensions around, than that there are images with alt attributes :).

Also, to illustrate the slowness of reflows, when you load e.g. a PHPBB 
forum from scratch (it doesn’t have sizes specified on the images), it’s 
very sluggish and jumps around all the time until the page is fully 
loaded. That is exactly what CSS is trying to avoid.

Note by the way that wherever you load an image CSS, it is independent 
of the image size (except content: url() of course), if the image is too 
big it will be cropped, if it’s too small it will be filled with the 
background colour, or repeated, etc.

So in practice people already specify dimensions for images in CSS.


> Reality:
> 1-) There's almost always a reflow, and there will be, in a www where  
> there are images. We'll just get used to it.

Yes, but: there is a reflow on every content image, not every image. 
There usually aren’t that much content images, and you can . If you go 
to my website for example, http://www.grauw.nl/, I think on most pages 
there won’t be a single content image except for the navigation one. And 
if there is one, it either has dimensions specified, or causes a reflow.

And, as said, all the images loaded by the CSS don’t cause reflows.

One single reflow is a big contrast to a reflow for each time some 
additional data is loaded on the webpage (which would e.g. be the case 
with grid and other layout methods).


~Grauw

-- 
Ushiko-san! Kimi wa doushite, Ushiko-san nan da!!
Received on Thursday, 30 June 2005 10:39:17 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Monday, 27 April 2009 13:54:38 GMT