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

Re: [CSS21] Used value versus specified and computed value (position relative)

From: Anton Prowse <prowse@moonhenge.net>
Date: Tue, 10 Jul 2012 09:33:49 +0200
Message-ID: <4FFBDADD.7090407@moonhenge.net>
To: W3C www-style mailing list <www-style@w3.org>
CC: www-style@gtalbot.org
On 09/07/2012 21:20, "Gérard Talbot" wrote:
> Hello,
>
> I'm struggling a bit with the understanding of following test:
>
> http://test.csswg.org/suites/css2.1/20110323/html4/relpos-calcs-001.htm
>
> What is inherited is the computed value, not the used value.
>
> So,
>
> line 25  top: inherit; /* using inheritance to test computed vs. used */
>
> top is 'auto'; top is not 50% and it is not 60px.
>
> So,
>
> 1- I do not see the purpose of the div.control in that test
>
> 2- div.inner's top property value inherited value is 'auto' which is
> resolved as 0; it is not 50%. div.inner's top property used value is 0,
> not 60px.

If a UA incorrectly computed 'top' on div.inner to -50% (the used value 
of that property on the parent) instead of 'auto' (the computed value of 
that property on the parent) then that div would be positioned higher up 
the canvas and the red background of div.control would show.

A small nit about this test: div.container has been given a 'margin-top' 
of '-60px', which is done purely for the aesthetic purpose of having the 
square appear directly under the paragraph without a gap, but this 
introduces the cognitive overhead of having to figure out whether or not 
it's purely aesthetic in the first place.

Cheers,
Anton Prowse
http://dev.moonhenge.net
Received on Tuesday, 10 July 2012 07:34:26 GMT

This archive was generated by hypermail 2.3.1 : Tuesday, 26 March 2013 17:20:56 GMT