W3C home > Mailing lists > Public > www-style@w3.org > June 2001

Proposal of alternative to CSS3 box-sizing property

From: Rod Dav4is <dav4is@bigfoot.com>
Date: Fri, 15 Jun 2001 11:03:30 -0400
Message-ID: <3B2A23C2.96F34E0C@bigfoot.com>
To: L-www-style <www-style@w3.org>
    My proposal is, instead of a new property, to add a new
optional modifier value that can be added to any of the
extant width/height properties. For the nonce, let's call
the new modifier "outside", and make it applicable only to
length and percent values on width, length, and the min- and
max- variants.
    Like the box-sizing defined in the css3 draft copy, this
modifier would cause conforming UAs to compute the content
width by subtracting the appropriate border and padding
widths. My proposal differs in that the appropriate margin
widths are also subtracted. In the case of collapsed
margins, 1/2 of the width of the collapsed margin is
subtracted.
    I believe the advantages of this proposal to be:

  1. It becomes much simpler to code adjacent boxes to
     exactly fill a container space. Using percentages would
     be easiest, and the only requirement is that their
     "outside" dimensions, albeit width or length, add up to
     100%.
        o Modifying pages becomes much simpler and less
          prone to error. In the context of use of the
          "outside" modifier, border widths, for example,
          can be changed at will without concern for
          "breaking" the fit. The content width is
          automatically adjusted accordingly. (If the
          content object no longer fits, this is to be
          treated no differently than an incorrect width
          value in CSS2.)
  2. The problem of mixed metrics on the various box
     components disappears.
  3. As a new modifier to extant properties, documents using
     it will cause legacy UAs to ignore the whole width
     (height) property as coded. What may seem a liability
     is actually an advantage.
        o As a new property, box-sizing will cause legacy
          UAs to use the coded width (height) without
          subtracting the border and padding lengths. The
          author had coded the width (height) with the
          expectation of the reduction, so the result width
          (length) in the legacy environment will likely be
          too large, causing overflow.
        o As an addition to an existing property, my
          proposal would cause legacy UAs to completely
          ignore the coded width (length) property, causing
          it to revert to "auto". This is much more likely
          to render in legacy UAs in more pleasing fashion
          than would box-sizing.

Comments?

--
Regards, Rod Dav4is / P.O. Box 118 / Hyde Park, NY 12538 /
USA
Genealogy, et Cetera: http://dav4is.8m.com 219 ancestral
families, mostly 17th-19th century New England, total
population: 55,224
Also: http://www.gencircles.com/users/dav4is/
Received on Friday, 15 June 2001 11:03:34 GMT

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