This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.

Bug 16226 - Margin collapsing: Clarify Note in 8.3.1 to use computed values of properties
Summary: Margin collapsing: Clarify Note in 8.3.1 to use computed values of properties
Status: NEW
Alias: None
Product: CSS
Classification: Unclassified
Component: CSS Level 2 (show other bugs)
Version: unspecified
Hardware: All Windows 3.1
: P2 normal
Target Milestone: ---
Assignee: Bert Bos
QA Contact: public-css-bugzilla
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-03-04 10:55 UTC by Anton P
Modified: 2012-12-04 00:51 UTC (History)
0 users

See Also:


Attachments

Description Anton P 2012-03-04 10:55:11 UTC
Reported by Anton Prowse

8.3.1 says, in the long Note:

  # - The bottom margin of an in-flow block box with a 'height'
  #   of 'auto' and a 'min-height' of zero collapses with its
  #   last in-flow block-level child's bottom margin if the box
  #   has no bottom padding and no bottom border and the child's
  #   bottom margin does not collapse with a top margin that has
  #   clearance.
  # - A box's own margins collapse if the 'min-height' property
  #   is zero, and it has neither top or bottom borders nor top
  #   or bottom padding, and it has a 'height' of either 0 or
  #   'auto', and it does not contain a line box, and all of its
  #   in-flow children's margins (if any) collapse.

The values in question of the 'height' and 'min-height' properties are *computed* values, but this is not clear in the prose.

Now, the spec often fails to be explicit about values being computed values, and this part of 8.3.1 is just a Note, and the normative prose in 8.3.1 (of which the Note is just a summary of consequences) is explicit in its use of computed values.  So this bug does not have especially high importance.

However, the distinction of whether it's the used value or the computed value of 'height' used in 8.3.1 is important to the application of 'min-height' and 'max-height' in 10.7, and so clarifying the Note above would remove a potential, albeit small, source of confusion.
Comment 1 Anton P 2012-03-04 10:58:03 UTC
Conversation begins: http://lists.w3.org/Archives/Public/www-style/2012Feb/1153.html

Bug description: http://lists.w3.org/Archives/Public/www-style/2012Feb/1342.html (penultimate part)
Comment 2 Anton P 2012-03-04 10:59:16 UTC
See Bug 15746 and Bug 15745 which describe another issues with the note mentioned.
Comment 3 Anton P 2012-03-04 11:02:16 UTC
Proposal:

Replace:

  # - The bottom margin of an in-flow block box with a 'height'
  #   of 'auto' and a 'min-height' of zero collapses with its
  #   last in-flow block-level child's bottom margin if the box
  #   has no bottom padding and no bottom border and the child's
  #   bottom margin does not collapse with a top margin that has
  #   clearance.
  # - A box's own margins collapse if the 'min-height' property
  #   is zero, and it has neither top or bottom borders nor top
  #   or bottom padding, and it has a 'height' of either 0 or
  #   'auto', and it does not contain a line box, and all of its
  #   in-flow children's margins (if any) collapse.

with:

  | - The bottom margin of an in-flow block box with a computed
  |   'height' of 'auto' and a computed 'min-height' of zero
  |   collapses with its last in-flow block-level child's bottom
  |   margin if the box has no bottom padding and no bottom
  |   border and the child's bottom margin does not collapse
  |   with a top margin that has clearance.
  | - A box's own margins collapse if it has a computed
  |   'min-height' of zero, and it has neither top or bottom
  |   borders nor top or bottom padding, and it has a computed
  |   'height' of either 0 or 'auto', and it does not contain a
  |   line box, and all of its in-flow children's margins (if
  |   any) collapse.