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

Tolerance of 1px on each side for anti-aliasing: feedback requested

From: Gérard Talbot <css21testsuite@gtalbot.org>
Date: Wed, 17 Oct 2012 01:31:10 -0400
Message-ID: <0ad3b6961b9a83f835b17acf3955f32c.squirrel@ed-sh-cp3.entirelydigital.com>
To: "Public CSS testsuite mailing list" <public-css-testsuite@w3.org>
Hello all,

I wish to know if we should allow to allocate 1px (as a margin of error
or latitude) on each side of squares, rectangles, etc.. to take into
account anti-aliasing.

Personally, I have never done that, this never happened in CSS 2.1 test
suite as far as I know and the most active contributors do not do that.

Typically, what is being done is:

        #overlapped-red {
            background: red;
            position: absolute;
            top: 1px;
            left: 1px;
            width: 158px;
            height: 158px;

        #overlapping-green {
            background: green;
            position: absolute;
            top: 0px;
            left: 0px;
            width: 160px;
            height: 160px;

so that the overlapping green is 2px wider and 2px taller than the
overlapped red. The painting covers more area than needed. Furthermore,
this way of coding is in a ttwf tutorial:


Should we allow (tolerate) this, encourage this or disallow this?

Why would doing this be necessary anyway, to begin with?


Sometimes, consequences of rounding effects could be misinterpreted as
anti-aliasing effects.

Eg. (to be viewed with Opera 12.02)


Rescaling from 60px to 100px implies an increase of 66.66666% and so
rounding down of percentage and then rounding down of fractional pixel
seem to occur for Opera 12.02 in such 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 Wednesday, 17 October 2012 05:31:38 UTC

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