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

Re: Computed Style and Border Width - Question [CSSOM]

From: Robert O'Callahan <robert@ocallahan.org>
Date: Tue, 1 Jul 2008 15:39:03 +1200
Message-ID: <11e306600806302039x2e0f6978lb4efb769d10cba1d@mail.gmail.com>
To: "Garrett Smith" <dhtmlkitchen@gmail.com>
Cc: Www-style <www-style@w3.org>
On Tue, Jul 1, 2008 at 6:04 AM, Garrett Smith <dhtmlkitchen@gmail.com>

> When an element's border width is computed from EM, should the
> computed border width include fractions of a pixel?
> IOW, when calling:-
>  getComputedStyle(el, '').borderWidth,
> - is the return a float or an int?
> Furthermore, should the precision, if rounded down for rendering, be
> preserved? If it is preserved, it would seem that three border-widths
> of 33.3px would add up to 100px, and that this is where the element
> should appear, and that measurement should be reflected in
> getBoundingClientRect.

In Gecko, getComputedStyle returns the used border values, and we round
border widths to *device* pixels before layout, so it can return non-integer
CSS px values when zooming is in effect.

"He was pierced for our transgressions, he was crushed for our iniquities;
the punishment that brought us peace was upon him, and by his wounds we are
healed. We all, like sheep, have gone astray, each of us has turned to his
own way; and the LORD has laid on him the iniquity of us all." [Isaiah
Received on Tuesday, 1 July 2008 03:39:39 UTC

This archive was generated by hypermail 2.3.1 : Monday, 2 May 2016 14:27:38 UTC