[CSS21] Margin-Collapse Property to fix inconsistency

Margin collapsing has an inconsistency I've never really seen the
reasoning behind-- it only works vertically not horizontally, which
seems an arbitrary decision, and also it can't be turned off.  I would
like to suggest that margin collapsing be something we have control
over and can disable.  The property could look something like this:

margin-collapse: vertical | horizontal | both/all | none

Horizontal margin collapse would go well with horizontal shrinkwrap
styles like display:table-cell/list-item and float.  You could also
make a gallery of equally-spaced floating thumbnails or boxes and only
have to specify one margin (margin: 4px) instead of having to halve it
in the horizontal direction since those margins don't collapse
(margin: 4px 2px).

For extra coolness, have it support top, bottom, left, and right in
there as well, combinatorily, so a user could do this to create a
gallery of tiles of content, eliminating extra margin space on the
right and bottom as it grows and floats:

..tile { margin-collapse: top left; margin: 1em 0 0 1em; float:left }

Also I'm quite sure many users would be very happy to do this:

* { margin-collapse: none }

Received on Monday, 18 June 2007 00:31:53 UTC