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

Does CSS-1 inhibit incremental rendering?

From: Hakon Lie <howcome@w3.org>
Date: Fri, 5 Jun 1998 15:37:52 +0200 (Europe de l'Ouest (Heure d'été))
Message-ID: <13687.62640.150000.146240@WWW53>
To: Gilbert Baumann <unk6@rz114s1.rz.uni-karlsruhe.de>
Cc: www-style@w3.org
Gilbert Baumann writes:

 >     I am currently at implementing a CSS-1 based browser. 

Wonderful. The people on this list will try to help you.

 > It 
 > works pretty well so far. I am thinking about support for 
 > incremental rendering, to utilize idle time while the processor 
 > waits for data from the server. However after inspecting my code 
 > I recognized that CSS-1 pretty well inhibits incremental 
 > rendering. 

It shouldn't. We try to make sure content can be formatted on a
per-line basis. 

 >     The problem I see here is the 'width' attribute of 
 > block-level elements. Before I can go on and render the 
 > block-level elements contents, I have to compute the effective 
 > width 'ewidth'. 
 >  
 > (For sake of simplicity I formulate all below modulo the padding 
 > and border widthen). 
 >  
 > Assume the most common case, where 'width' is 'auto' and 
 > 'margin-left' and 'margin-right' are absolute values. Then my 
 > interpretation of CSS-1, section 4.1.2 "Horizontal formatting" is 
 > to calculate the effective width 'ewidth' as follows: 
 >  
 > #  ewidth <- parent.width - margin-left - margin-right; 

correct

 > Unfortunately the calculation of 'minimum-width' on block level 
 > elements requires the inspection of all children. The minimum 
 > width on block level elements is roughly: 
 >  
 >   x.minimum-width :=       Sup           c.minimum-width ; 
 >                        c in x.children  

By 'minimum-width' I presume you refer to this passage from CSS1 [1]:

  The 'width' has a non-negative UA-defined minimum value (which may
  vary from element to element and even depend on other properties). If
  'width' goes below this limit, either because it was set explicitly,
  or because it was 'auto' and the rules below would make it too small,
  the value will be replaced with the minimum value instead.

[1] http://www.w3.org/TR/REC-CSS1#horizontal-formatting

If so, there is nothing in the specification which requires you to
check the width of the children elements. 

Note that CSS2 allows a style sheet to set a minimum width through
the 'min-width' property [2]:

[2] http://www.w3.org/TR/REC-CSS2/visudet.html#min-max-widths

'min-width' has also been carefully crafted to avoid having to
calculate the width of child elements. 

So, I don't understand what makes you think you need to do children
first. Please let us know.

 > PS. Please take my apologies if this is addressed in CSS-2. I am 
 >     tired of reading RFCs and following the newest and hotest 
 >     standards, so I settled on HTML-4.0 and CSS-1 to get my 
 >     project finished sometime. 

This is a reasonable approach. 

 >     If standards get out faster than 
 >     you could code them, you'll never finish. 

When to or more implementors are ready to go in the same direction,
they ofte use W3C as a table for negotiations. CSS2 is a result of
this.

Regards,

-h&kon

H   ĺ   k   o   n      W   i   u   m       L   i   e
howcome@w3.org      http://www.w3.org/people/howcome
World     W      i     d     e       Web  Consortium
Received on Friday, 5 June 1998 09:39:17 GMT

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