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

RE: collapsing margins illogical

From: RUST Randal <RRust@COVANSYS.com>
Date: Tue, 8 Jan 2002 14:09:01 -0500
Message-ID: <37925254B67DD311876C009027B0FF9201D3A5B5@cbscolex01.cbsinc.com>
To: "'Sean Proctor'" <sproctor@ccs.neu.edu>, "Css (E-mail)" <www-style@w3.org>

I agree with you.  I have been perplexed by some of the decisions regarding
CSS that have been made.  For example, when you specify the width of a box,
you are actually specifying the width of the content inside the box, not how
wide the entire box should be.  If we used that method in the real world, we
would have 8 1/2 x 11 sheets of paper that are actually 9 1/2 inches wide,
thanks to the margin on the left.


-----Original Message-----
From: Sean Proctor [mailto:sproctor@ccs.neu.edu]
Sent: Monday, January 07, 2002 9:40 PM
To: www-style@w3.org
Subject: collapsing margins illogical

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:08:42 UTC

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