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

RE: box-sizing alternative

From: Joe Hewitt <joe@joehewitt.com>
Date: Tue, 29 Feb 2000 13:21:07 -0500
To: <www-style@w3.org>
Message-ID: <000101bf82e1$bff1a380$31cfb326@zenimax.com>
> Content-width + border-width + padding-width should
> either WRAP within
> WIDTH or be CLIPPED by WIDTH at the user's discretion.

That sort of makes sense to me.  What I described has "content-width"
over-riding "width", and what you are describing has "width" over-riding
"content-width".  However, there are some issues with your suggestion.

We need to strictly define which of the 4 inner "widths" ("width",
"content-width", "border-width", "padding-width") has the most authority in
times of conflict.  Let's try it your way:

"width" is the king of all widths.  If you state "width: 600", then that
WILL be the size of the box.  If "content"+"padding"+border" exceed 600, we
need to know whether to clip or shrink these.  Clipping them is easy, but if
we shrink them then we need to know which ones shrink first.  How about
"content" is the first to go.  You shrink it until it fits, or until it
reaches 0 (default) or it's min-width or the absolute smallest it's content
can be.  But what if that's not enough to make it fit? Do you then start
shrinking the border/padding?  That doesn't seem right to me.  Also, what if
the content of the element absolutely will not fit within the size you tell
"content" to be.  What do you do then?

This is why I recommended that "width" be expanded rather than trying to
squeeze it's children inside of it.  You just can't guarantee they would
fit, and I wouldn't want to brutally clip as an extreme measure.

- Joe
Received on Tuesday, 29 February 2000 13:17:27 GMT

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