W3C home > Mailing lists > Public > www-dom@w3.org > April to June 2001

Re: Converting CSSStyleDeclaration values to other units

From: Jeff Yates <PBWiz@PBWizard.com>
Date: Thu, 19 Apr 2001 00:38:21 -0400
Message-ID: <001a01c0c88a$91130a00$6a5dfea9@pbwizshop>
To: "Ian Hickson" <ian@hixie.ch>, "Jeff Yates" <PBWiz@mail.pbwizard.com>
Cc: <www-dom@w3.org>
I would think that all computed values should be in pixels, but that is left
up to the implementation since it is stated that it must be done in pixels.
I have not tested this in Mozilla as of yet since it is still buggy, but I
can see where this can become an issue.

Let us say that the style is defined in points, the most convenient method
would be to just pass it along in points.  It would not require the browser
to interact with it's layout engine to calculate the value in pixels.  As
you can see, it depends upon how important speed is (both speed in coding as
well as processing) to the development team.

Jeff Yates
e-mail:    PBWiz@PBWizard.com
Homepage:  http://www.PBWizard.com

----- Original Message -----
From: "Ian Hickson" <ian@hixie.ch>
To: "Jeff Yates" <PBWiz@mail.pbwizard.com>
Cc: <www-dom@w3.org>
Sent: Wednesday, April 18, 2001 11:06 PM
Subject: Re: Converting CSSStyleDeclaration values to other units

> On Wed, 18 Apr 2001, Jeff Yates wrote:
> >
> > Yes, but the problem with this is that you cannot get the relative
> > value (say "em") to another relative unit (say "px").  Most scripts
> > deal with pixels.
> >
> > It all boils down to though that the need to be able to convert to
> > pixels is great, no matter what unit is was declared with.  Of course
> > I am talking about ONLY computed styles, not style declarations.
> Shouldn't computed values on pixel devices always be in pixels anyway?
> --
> Ian Hickson                                            )\     _. - ._.)
> Invited Expert, CSS Working Group                     /. `- '  (  `--'
> The views expressed in this message are strictly      `- , ) -  > ) \
> personal and not those of Netscape or Mozilla. ________ (.' \) (.' -'
Received on Thursday, 19 April 2001 00:42:17 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 20 October 2015 10:46:08 UTC