[CSS21] Question about width calculation for replaced elements with intrinsic percentage width

This is in reference to 
http://www.w3.org/TR/2007/CR-CSS21-20070719/visudet.html#inline-replaced-width

I'm having a bit of an issue with the last paragraph of this section:

   Percentage intrinsic widths are first evaluated with
   respect to the containing block's width, if that width
   doesn't itself depend on the replaced element's width.
   If it does, then a percentage intrinsic width on that
   element can't be resolved and the element is assumed to
   have no intrinsic width.

Leaving aside the confusion over what "first" means there, since there is no 
"later" to go with it, the problem I have is that "if that width doesn't itself 
depend on the replaced element's width" can be rather difficult to determine, 
since said dependency can be very indirect.  For example, the containing block 
is an auto-width block or a percentage-width block, and somewhere up its 
ancestor chain something is shrink-wrapping.  Or tables might be involved 
anywhere in the ancestor chain.

It would make more sense to me if a percentage intrinsic width were treated more 
like a percentage specified width: always treated as a percentage of the 
containing block width, whatever that may be.  For shrink-wrapping purposes, the 
preferred width and preferred minimum width could be either 300px, or whatever 
they are for an empty block with a percentage width, or something else.

Thoughts?

-Boris

Received on Sunday, 27 January 2008 22:05:02 UTC