W3C home > Mailing lists > Public > www-style@w3.org > February 2000

Re: Shrinkwrap

From: Joe Hewitt <joe@joehewitt.com>
Date: Tue, 29 Feb 2000 10:08:52 -0500
To: <www-style@w3.org>
Message-ID: <000101bf82c6$e44277c0$31cfb326@zenimax.com>
I have recently run into this problem while debugging an application of mine
in Mozilla, so I would be happy to describe several situations in which
"shrink-wrapping" would be of extreme value.

Say, for example, that you are using Javascript and DOM to write a widget
for displaying a list.  The user provides you with a list of labels, and you
display the labels in divs (positioned absolutely) vertically one on top of
the other.  The user does not provide an explicit width for the list,
meaning that he wants it to default to the width of the longest label in the

Using the current system, it is impossible to determine the actual width of
each of the label elements so that you can calculate the widest one.
Defaulting element size to expand to the edge of it's parent simply robs us
of this essential information. Conceptually, when a user declares an
element, gives it a style and some content, the user expects the element to
be the size of it's content.
Received on Tuesday, 29 February 2000 10:05:16 UTC

This archive was generated by hypermail 2.3.1 : Monday, 2 May 2016 14:26:53 UTC