W3C home > Mailing lists > Public > www-style@w3.org > January 2002

collapsing margins illogical

From: Sean Proctor <sproctor@ccs.neu.edu>
Date: Mon, 7 Jan 2002 21:40:04 -0500 (EST)
Message-ID: <Pine.GSO.4.21.0201072138020.24675-100000@denali.ccs.neu.edu>
To: www-style@w3.org
what was the design decision behind the way margins are collapsed between
nested blocks?  to me it seems to make far more sense to maintain the
margins as much as possible without taking extra space.

blockA { margin: A; }
blockB { margin: B; }
blockC { margin: C; }

it would make sense to me for the margin between blockC and blockA to be
max(C, A).  the margin between blockA and blockB then would be 0 if B <
max(A, C) otherwise B - max(A, C).  or simply max(0, B - max(A, C)).  in
otherwords, the margin of a block is not affected by its content.

an example that clearly illustrates this is
http://www.psa.neu.edu/list_test/  One would expect the space at the top
of the list to be gray, but it's blue.  According to the spec this makes
sense, but intuitively it doesn't.


PS Could you CC any responses to me?
Received on Tuesday, 8 January 2002 14:01:03 UTC

This archive was generated by hypermail 2.3.1 : Monday, 2 May 2016 14:27:00 UTC