Re: [CSS2.1] Interop Issue in regards to fixed/absolute positioned children inside of inline-relative containers

On 30/07/2014 7:55 AM, Greg Whitworth wrote:
>> Here is a test case for the vertical offset also seen in Boris
>> Zbarsky's test case which Firefox fails.
>>
>> http://css-class.com/test/css21testsuite/abs-pos-child-inside-rel-pos-inline-
>>
>>
offset-002.html
>
> I would also like to note since it was brought up:
>
> # As is seen in the test case 'containing-block-inline4.htm' [5] all
> browsers are mispositioning the green box.

Not really. Please see below. Also [5] has been replaced with [1].

> A colleague of mine told me that during our work on IE9 we did try to
> adhere explicitly to the spec and place the inline box exactly where
> it would have been if it were static, but ran into too many compat
> issues during testing. As such, I  do think that the spec should be
> updated to match reality that the UAs use the top of the containing
> block for placement of absolutely placed boxes.
 >
> Thank you all for your help on this!
>
> Greg

Hello Greg. It Took me a while to determine that this was not in the 
testsuite but was a test case that I did [1]. I was going to return to 
that one. The relative with offset one shows Firefox 31 failing where 
IE11 and Chrome 36 passes.

http://css-class.com/test/css21testsuite/abs-pos-inline-child-inside-rel-pos-inline-offset-001.html

Now for 'containing-block-inline4.htm'. It's not that all browsers are 
mispositioning the green box but rather how the placement of a baseline 
is effected when an inline box with a 'display' value of 'inline-block' 
should influence the baseline of text outside of it. Gérard pointed out 
the last line of 10.8.1

http://www.w3.org/TR/CSS21/visudet.html#leading

   | The baseline of an 'inline-block' is the baseline
   | of its last line box in the normal flow, unless
   | it has either no in-flow line boxes or if its
   | 'overflow' property has a computed value other than
   | 'visible', in which case the baseline is the bottom
   | margin edge.

This is seen in the first part of the following test 
(inline-block-baseline.html) 'inline-block and a height that is auto'. 
Regardless of how many <br> or block-level boxes are within the 
'inline-block', the baseline is based on the last line box in the normal 
flow that are outside of the inline-block.

http://css-class.com/test/temp/inline-block-baseline.html

This does not happen if the inline-block is not auto height. Please see 
'inline-block and a height that is not auto'. There is nothing in the 
spec that says this should happen but all UAs agree so it's not that the 
the UAs are doing wrong but we are seeing unspecified behavior. In the 
case of the green box in 'containing-block-inline4.htm' [1], what we are 
seeing is correct in how UAs treat 'inline-block and a height that is 
not auto' and is not that the static position for the abs-pos-inline is 
wrong. This is why I did a further test 'containing-block-inline5.htm' 
that showed that is was the 'inline-block and a height that is not auto' 
that was the culprit of the unexpected behavior.


1. http://css-class.com/test/temp/containing-block-inline4.htm
2. http://css-class.com/test/temp/containing-block-inline5.htm


Alan

Received on Wednesday, 30 July 2014 02:36:59 UTC