[CSS2.1] Replaced elements

Hi,
One of the most important change in the new CSS 2.1 WD seems to be
how to handle embedded content in replaced elements. The approach is
to introduce a new concept, "intrinsic ratio" which is used to define
how a CSS renderer shall calculate sizes of replaced elements
containing content. The problem i have with this is that it dosen't
seem to cover enough cases (types of embedded content) and may limit
future additions in the area.

Whats the reason for choosing the approach that the CSS renderer
needs to be aware of a ratio rather than that the embedded media
needs to be made aware of the CSS constraints? The second would allow
better handling for different types of media in my opinion, and the
CSS renderer could still enfore its restrictions if the embedded 
media was not capable of properly handling all the relevant CSS
constraints. Even with the change, i think the example
http://www.w3.org/TR/2005/WD-CSS21-20050613/conform.html#replaced-
element
"(for example a blank HTML document)."
should be removed since it would be good if HTML could be better used
in embedding elements in the future (even a blank HTML document might
be considered to have a minimum width/height due to default style).

One specific feature that i would like to see more described is how
shrink-wrap on this type of replaced element is handled. Using 300px
for that seems like a bad idea, and it seems more reasonable to leave
it to the embedded media (eg SVG might choose to check if the viewbox
attribute holds reasonable values, "text/plain" might check the
widest line etc).

Finally, does the table under 'max-width' still work when the
replaced elements use the intrinsic ratio? 

 /Staffan

Received on Wednesday, 15 June 2005 16:24:22 UTC