W3C home > Mailing lists > Public > public-css-testsuite@w3.org > May 2010

2 Microsoft testcases with the fractional pixel problem

From: Gérard Talbot <css21testsuite@gtalbot.org>
Date: Sun, 16 May 2010 20:43:54 -0700
Message-ID: <52e86255dba0a93442e34441da84db44.squirrel@cp3.shieldhost.com>
To: "public-css-testsuite@w3.org" <public-css-testsuite@w3.org>
Cc: "Arron Eicholz" <Arron.Eicholz@microsoft.com>
Hello all,

Arron wrote:
> If there are cases that have this fractional pixel problem let me know.


#div1's padding-bottom is computed as 37.8px = 1cm
#div2's margin-top is computed as -75.6px = 2cm

96px/in / 2.54cm/in = 37.795px; 2cms = 75.59px

but as I earlier said, some browsers (Firefox 3.6.3, Konqueror 4.4.3,
Safari 4.0.5) will truncate the fraction part.

#div1's height is 75px (not 76px) and positioned at 51px from top of
box while
#div2's height is 37px, has a border-bottom of 37 (so 74px, not 75px)
and positioned at 50px from top of document box. #div2's margin-top is
-75.6px but the .6px is truncated. Everything is nicely reported in
Firefox's DOM inspector. Same thing with Konqueror's DOM treeviewer.

So, that's why there is a tiny red border seen, noticeable in that
testcase in Firefox 3.6.3, Konqueror 4.4.3 and Safari 4.0.5.



also displays, shows a tiny red border in Firefox 3.6.3 and Konqueror

Those 2 testcases should be reviewed, adjusted so that the fractional
pixel issue be avoided.

regards, Gérard
Contributions to the CSS 2.1 test suite:

CSS 2.1 test suite (alpha 2; March 16th 2010):

CSS 2.1 test suite contributors:
Received on Monday, 17 May 2010 03:44:31 UTC

This archive was generated by hypermail 2.4.0 : Friday, 20 January 2023 19:58:14 UTC