W3C home > Mailing lists > Public > public-css-testsuite@w3.org > August 2012

[RC6] absolute-non-replaced-max-height-010 and 011: some difficulties and modifications

From: Gérard Talbot <css21testsuite@gtalbot.org>
Date: Wed, 29 Aug 2012 23:26:33 -0400
Message-ID: <6989c2029e023d03237d36089d6a4381.squirrel@ed-sh-cp3.entirelydigital.com>
To: "Arron Eicholz" <Arron.Eicholz@microsoft.com>
Cc: "Public CSS test suite mailing list" <public-css-testsuite@w3.org>



The text assert was stating:

<meta name="assert" content="The 'auto' values for 'margin-top' and
'margin-bottom' are set to '0', when 'top', 'height' and 'bottom' are
all not auto.">

but in the test, top is 'auto'; therefore this rule was triggered:
'top' is 'auto', 'height' and 'bottom' are not 'auto', then set 'auto'
values for 'margin-top' and 'margin-bottom' to 0, and solve for 'top'

This is how I have fixed this test:





This test has more difficulties.

                bottom: 1in;
                height: auto;
                margin-bottom: auto;
                margin-top: auto;
                max-height: 0.5in;
                position: absolute;
                top: 1in;

'height' is 'auto', 'top' and 'bottom' are not 'auto', then 'auto'
values for 'margin-top' and 'margin-bottom' are set to 0 and solve for

After solving the height to 1in, it is constrained to 0.5in by
max-height. Since height changed from auto to 0.5in, the parser must
re-enter the algorithm since the height value changed.

The tentative used height is calculated (without 'min-height' and
'max-height') following the rules under "Calculating heights and
margins" above.
If this tentative height is greater than 'max-height', the rules above
are applied again, but this time using the value of 'max-height' as the
computed value for 'height'.

The "Calculating heights and margins" above is section 10.6.4!

So now, thanks to height being constrained and no longer an 'auto'
value, this new set of conditions applies:

If none of the three [top, height, bottom] are 'auto': If both
'margin-top' and 'margin-bottom' are 'auto', solve the equation under
the extra constraint that the two margins get equal values.

And this is why the blue rectangle gets vertically centered in the
hollow black square.

This is how I have fixed this test:


Contributions to the CSS 2.1 test suite:

CSS 2.1 Test suite RC6, March 23rd 2011:

CSS 2.1 test suite harness:

Contributing to to CSS 2.1 test suite:
Received on Thursday, 30 August 2012 03:26:58 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 6 January 2015 21:13:24 UTC