Re: [CSS21] Proposal to define "Block container element"

On 8/1/12 11:24 PM, "Anton Prowse" <prowse@moonhenge.net> wrote:

>> On 15/07/2012 01:12, Anton Prowse wrote:
>> The term "Block container element" is not defined in CSS21 (although
>>> block container /box/ is, in 9.2.1.).  Several participants on this
>>>list
>>> have expressed concern about this in the past.
>>
>>> I propose the following insertions/deletions to 9.2.1.  The changes are
>>> limited to shuffling a couple of existing sentences around (untouched)
>>> and introducing just two new concepts:
>>>
>>> (1) The definition of "principal block-level box" is extended to
>>> "principal box" for a wider range of elements (inline block, inline
>>> table and table cell in addition to block-level elements).  This has no
>>> effect on the rest of the spec, since the only cases where the
>>>principal
>>> box is referred to is in the context of block-level elements/boxes.
>>>
>>> (2) The term "block container element" is introduced to mean an element
>>> whose principal box is a block container box, ie a block, list-item,
>>> inline-block, table, inline-table or table-cell in CSS21.
>
>In [1], in response to the proposal in [2], Alan Stearns asks:
>
>> Should table-caption also be on the list [of elements which are
>> block  container elements]?
>
>Table captions are necessarily block-level, so are already included.

Thanks. I should have been more specific about which list. The list I was
referring to is this one:

# The following
  # values of the 'display' property make a non-replaced element a
  # block container: 'block', 'list-item', 'table', 'inline-block',
  # 'inline-table', 'table-cell'.


I meant to point out that 'table-caption' is a value of 'display' that
makes a non-replaced element a block container. So it should probably be
included in this list.

>
>> Is a ::before {display:block} a "block container element"?
>
>CSS21 uses the word "element" in a way which includes pseudo-elements.
>So the question is really asking, can pseudo-elements generate a
>principal box?  I feel that they can/should, depending on their display
>type of course.  Do you see any potential issues with that?

No issue - I was unclear whether "element" included pseudo-elements.
Thanks for the clarification.

Alan

Received on Thursday, 2 August 2012 13:48:34 UTC