- From: Peter Moulder <peter.moulder@monash.edu>
- Date: Sun, 09 Jan 2011 12:09:51 +0000
- To: www-style@w3.org
Lots of CSS visual formatting depends on whether something is inline-level or block-level. CSS simply cannot be implemented for visual media without knowing whether or not a given box or element is block-level, and whether it is inline-level. Whereas the existing text has the following problems: - The first sentence of §9.2.1 reads like a definition (it uses <dfn> and is phrased as a definition: "are those ... that ..."), yet it is both circular (we don't know how it's visually formatted without knowing whether it's block-level), unclear ("visually formatted as blocks" might reasonably be seen as applying to inline blocks) and arguably false (inline-level elements are arguably formatted visually as blocks when their box is enclosed in a block-level box). - The second sentence of §9.2.1, which comes closest to giving a true definition, still has the following problems: + It doesn't say whether any other elements are ever block-level. For example, it doesn't say whether inline-table or inline-block are ever block-level elements. I believe there's nothing that says clearly that no inline-level element is a block-level element. (This problem is of course made worse by the omission of 'table-caption' from the list, which makes it quite clear that there are other elements that are block-level.) + It doesn't say whether all display:block etc. elements are block-level or only some of them. This problem is easy to address: e.g. make the first sentence of §9.2.1 be: | Block-level elements in CSS 2.1 are those elements whose computed | value of the 'display' property either is one of 'block', 'list-item', | 'table' or 'table-caption', or is 'run-in' and the element generates a | block-level box according to section 9.2.3. (This can be followed with the existing first sentence but changed to a description rather than definition: | Block-level elements are formatted visually as blocks (e.g., | paragraphs). .) I believe that "in CSS 2.1" is already enough to cover future levels of CSS; if it's important then we could add an explicit statement that "future levels of CSS may ...". Much the same comments apply to the first two sentences of §9.2.2 wrt inline-level elements (and hence boxes). pjrm.
Received on Sunday, 9 January 2011 12:10:27 UTC