W3C home > Mailing lists > Public > www-style@w3.org > September 2012

[CSS21] Question on percentage, inherit and relative positioning: relpos-calcs-001 test

From: Gérard Talbot <www-style@gtalbot.org>
Date: Tue, 25 Sep 2012 21:04:39 -0400
Message-ID: <53dcdfd06b11507d9cd0172dbb97666f.squirrel@ed-sh-cp3.entirelydigital.com>
To: "Public W3C www-style mailing list" <www-style@w3.org>

I have trouble understanding this test:


div.outer's computed bottom value is -50%; therefore, div.outer's top
computed value should be +50%.

Computed value: (...) if specified as a percentage, [then] the specified 

For relatively positioned elements, 'left' and 'right' move the box(es)
horizontally, without changing their size. 'Left' moves the boxes to the
right, and 'right' moves them to the left. Since boxes are not split or
stretched as a result of 'left' or 'right', the used values are always:
left = -right.

div.inner's top specified value should therefore be 50% but no browsers
(Firefox 15.0.1, Chrome 22.0.1229.79 and Opera 12.02) reports such value.
They all report 'auto' (Chrome 22.0.1229.79 and Opera 12.02) or 0px
(Firefox 15.0.1) when I think browsers should make div.inner inherit '50%'
which then would be applied to div.outer to get its used value.
div.inner's containing block is div.outer; so, top: 50% should compute as
60px since div.outer's height is 120px.

What am I missing here?

CSS 2.1 Test suite RC6, March 23rd 2011

Contributions to CSS 2.1 test suite

Web authors' contributions to CSS 2.1 test suite
Received on Wednesday, 26 September 2012 01:05:07 UTC

This archive was generated by hypermail 2.4.0 : Friday, 25 March 2022 10:08:21 UTC