Skip to main content

Bug Tracker

Side navigation

#11954 closed bug (duplicate)

Opened June 22, 2012 09:54AM UTC

Closed June 22, 2012 12:25PM UTC

Last modified June 25, 2012 02:05PM UTC

Return unite is invalid whith .css

Reported by: Frackher Owned by:
Priority: undecided Milestone: None
Component: unfiled Version: 1.7.2
Keywords: Cc:
Blocked by: Blocking:

I think it might be a bug.

Two examples, one returning marginLeft, the other left.

For the first one the value is in px.

For the second the value is in percent (and that's what should be).

Attachments (0)
Change History (5)

Changed June 22, 2012 12:25PM UTC by mikesherov comment:1

resolution: → duplicate
status: newclosed

This is a bug in webkit, and noted in source (, and is a dupe of #9505.

Notice who is commenting on that bug report ;)

If anything, we're going to normalize to pixels, because that's the direction the browsers are going in, and is more useful for us internally.

btw, I had also submitted a bug to W3C:

Changed June 22, 2012 12:25PM UTC by mikesherov comment:2

Duplicate of #9505.

Changed June 22, 2012 03:57PM UTC by Frackher comment:3

Oh, yes sorry I posted too ealy without verifying on the older, I wasn't able to formulate correctly the bug.

Maybe in the doc can we make a note for this particular case ?

Changed June 22, 2012 06:55PM UTC by mikesherov comment:4

No need to be sorry :-)

I'm personally reluctant to enumerate and document all the ways in which getComputedStyle returns inconsistent results... it'll be the longest doc page on the site.

Also, in 1.8, "top" and "left" will be fixed, and only "bottom" and "right" will be faulty. Hopefully by then, webkit fixes the bug too!

Changed June 25, 2012 02:05PM UTC by Frackher comment:5

Yeah hope too !

Meanwhile I'll made a function to return the value in percent and not in px ;).

BTW, nothing to do here, but I can't receive my password by email (and so on I can't havec access to my account) Any Idea ?