- From: Bert Bos <bert@w3.org>
- Date: Tue, 19 Feb 2008 21:59:22 +0100
- To: W3C style mailing list <www-style@w3.org>
CSS allows rendering (transclusion) of images in a document without
showing scrollbars: no matter what the size of the image, by default
the box around it will be exactly as large as needed. But it can't
transclude external text documents without showing scrollbars.
I'd like to be able to display
<object data="somefile.html"></object>
(or, equivalently, <img src="somefile.html" alt="">) in such a way that
the box is exactly as big as needed for that document.
If that external text uses the same style sheet as the current document,
it will just look as if it is part of the current document. (Most
browsers have a problem with hyperlinks in such transcluded documents;
that also needs to be fixed...)
This would be quite handy for elements that are the same on several
pages, such as navigation menus or advertisements.
The reason it doesn't work currently is that CSS requires the external
object to have a fixed ratio between width and height. Any object that
doesn't have that is simply put in a box of 300×150 px.
The latest idea I came up with to enable such rendering is this:
object { width: 40em; height: complex }
'Complex' makes the renderer try harder than 'auto'. It determines the
height *after* actually rendering the object (or after asking a plug-in
to render it).
Comments?
Bert
P.S. I don't expect 'complex' to work on 'width', only on 'height'
--
Bert Bos ( W 3 C ) http://www.w3.org/
http://www.w3.org/people/bos W3C/ERCIM
bert@w3.org 2004 Rt des Lucioles / BP 93
+33 (0)4 92 38 76 92 06902 Sophia Antipolis Cedex, France
Received on Tuesday, 19 February 2008 20:59:38 UTC