Re: [CSS21] (Appendix E) Are inline-blocks "block equivalent"?

On 15/05/2012 00:05, Anton Prowse wrote:
> On 11/05/2012 16:07, Simon Sapin wrote:
>> Appendix E uses this sentence twice:
>> "If the element is a block, list-item, or other block equivalent"
>>
>> What is a "block equivalent"? Do inline-blocks fall in that category?
>>
>> I’m trying to figure out how to make sure that inline-blocks (that may
>> or may not be positioned, with z-index that may or may not be 'auto')
>> get their background and borders painted exactly once...
>
> Yes, this does seem a bit muddled, doesn't it.
>
> As I read it, inline-blocks and inline-tables which establish stacking
> contexts don't get their backgrounds painted at all in the algorithm,
> unless they're covered by "block equivalent" in Step 2.
>
> I think Step 2 should in fact be talking about block containers.
>
> Replace:
>    # Step 2: If the element is a block, list-item, or other block
>    #         equivalent:
> with
>    | Step 2: If the element is a block container or block-level replaced
>    |         element:
>
> Similarly, replace:
>    # Step 4: For all its in-flow, non-positioned, block-level
>    #         descendants in tree order: If the element is a block,
>    #         list-item, or other block equivalent:
> with:
>    | Step 4: For all its in-flow, non-positioned, block-level
>    |         descendants in tree order:
>    |         If the element is a block container or replaced element:

(Note that this proposal also addresses the observation – which I failed 
to state originally – that "block equivalent" must include block-level 
replaced elements else such elements do not have their background and 
borders painted in the algorithm.)

Cheers,
Anton Prowse
http://dev.moonhenge.net

Received on Saturday, 14 July 2012 12:50:21 UTC