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

[css3 box, cssom] flexibility in box-sizing and offset* properties

From: mikewse <mikewse@hotmail.com>
Date: Wed, 28 Feb 2007 02:51:07 -0800 (PST)
Message-ID: <9201703.post@talk.nabble.com>
To: www-style@w3.org


[Excuse me if this has been discussed before.]

Regarding the current suggestion on box-width/box-sizing, why not generalize
it to all edges, ie margin-box, border-box, padding-box and content-box?
There are situations when all these alternatives can be useful.
Either it can be done by adding more values to box-sizing, or to add more
properties f ex margin-box-width, border-box-width etc, but the latter may
lead to a property name "explosion" as you probably want to offer this
functionality for min-width/max-width, positioning etc.

An alternative could be to use suffixes on existing properties:
  #myDiv {
    width.marginedge: 90%;
    min-width.contentedge: 5em;
  }
where the last property assignment could as well be written as "min-width"
without suffix as it corresponds to the current CSS21 rules. The same system
could apply to positioning properties (top.borderedge etc).

A related feature is being able to query an element's position and size with
respect to different edges using the offset* DOM properties, or similar
feature. Today we see developers using libraries like Dojo (dojo.html.layout
package) to get to this information in a convenient way. It would be a
strength to have this standardized in the browser's native library instead.

Best regards
Mike


-- 
View this message in context: http://www.nabble.com/-css3-box%2C-cssom--flexibility-in-box-sizing-and-offset*-properties-tf3308087.html#a9201703
Sent from the w3.org - www-style mailing list archive at Nabble.com.
Received on Wednesday, 28 February 2007 10:51:14 GMT

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