W3C home > Mailing lists > Public > www-style@w3.org > October 2009

[CSS21] Issue 65 : inline-blocks as inline-level elements

From: Anton Prowse <prowse@moonhenge.net>
Date: Tue, 13 Oct 2009 20:24:04 +0200
Message-ID: <4AD4C5C4.5090409@moonhenge.net>
To: "www-style@w3.org" <www-style@w3.org>
Issue 65[1] has been resolved, and 9.2.2 now says:[2]

   # Several values of the 'display' property make an element inline:
   # 'inline', 'inline-table', 'inline-block' and 'run-in' (part of the
   # time; see run-in boxes).

while 9.2.4,[3] regarding the 'inline-block' value of the 'display'
property, says:

   # The inside of an inline-block is formatted as a block box, and the
   # element itself is formatted as an inline replaced element.

Just a couple of trivial editorial problems arise:

Issue 1:  10.1 (Definition of "containing block")[4]

   # If the element has 'position: absolute', the containing block is
   # established by the nearest ancestor with a 'position' of 'absolute',
   # 'relative' or 'fixed', in the following way:
   #    1. In the case that the ancestor is inline-level, the containing
   #       block depends on the 'direction' property of the ancestor:
   #          1. If the 'direction' is 'ltr', the top and left of the
   #             containing block are the top and left padding edges of
   #             the first box generated by the ancestor, and the bottom
   #             and right are the bottom and right padding edges of the
   #             last box of the ancestor.
   #          2. If the 'direction' is 'rtl', the top and right are the
   #             top and right padding edges of the first box generated
   #             by the ancestor, and the bottom and left are the bottom
   #             and left padding edges of the last box of the ancestor.
   #       Note: This may cause the containing block's width to be
   #       negative.
   #    2. Otherwise, the containing block is formed by the padding edge
   #       of the ancestor.

(1) should exclude 'inline-block' so that (2) applies instead.

Issue 2:  10.8.1 (Leading and half-leading, 'line-height')[5]

   # On a block-level, table-cell, table-caption or inline-block element
   # whose content is composed of inline-level elements, 'line-height'
   # specifies the minimal height of line boxes within the element. [...]

   # On an inline-level element, 'line-height' specifies the height that
   # is used in the calculation of the line box height (except for inline
   # replaced elements, where the height of the box is given by the
   # 'height' property).

Although not strictly necessary, it would aid clarity to add
'inline-block' to the exception in the latter paragraph.

Issue 3:  Whilst both 10.2 (the 'width' property)[6] and 10.5 (the
'height' property)[7] say that these properties apply to all elements
but non-replaced inline elements, table columns, and column groups, 10.5
goes on to say:

   # This property specifies the content height of boxes generated by
   # block-level, inline-block and replaced elements.

whereas 10.2 says only:

   # This property specifies the content width of boxes generated by
   # block-level and replaced elements.

"inline-block" should probably be added to the above to synchronize
these paragraphs.

[1] http://wiki.csswg.org/spec/css2.1#issue-65
[2] http://www.w3.org/TR/CSS2/visuren.html#inline-boxes
[3] http://www.w3.org/TR/CSS2/visuren.html#display-prop
[4] http://www.w3.org/TR/CSS2/visudet.html#containing-block-details
[5] http://www.w3.org/TR/CSS2/visudet.html#propdef-line-height
[6] http://www.w3.org/TR/CSS2/visudet.html#the-width-property
[7] http://www.w3.org/TR/CSS2/visudet.html#the-height-property

Anton Prowse
Received on Tuesday, 13 October 2009 18:26:20 UTC

This archive was generated by hypermail 2.4.0 : Friday, 25 March 2022 10:07:39 UTC