WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED CONFIGURATION CHANGED
18175
document.defaultView.getComputedStyle(el, '').left returns empty "auto". Always.
https://bugs.webkit.org/show_bug.cgi?id=18175
Summary
document.defaultView.getComputedStyle(el, '').left returns empty "auto". Alw...
Garrett Smith
Reported
2008-03-27 23:22:02 PDT
getComputedStyle returns wrong results for left and top. The value returned is always 'auto'
Attachments
testcase showing problem
(774 bytes, text/html)
2008-03-27 23:24 PDT
,
Garrett Smith
no flags
Details
position: relative, left is still auto
(765 bytes, text/html)
2008-03-28 23:01 PDT
,
Garrett Smith
no flags
Details
View All
Add attachment
proposed patch, testcase, etc.
Garrett Smith
Comment 1
2008-03-27 23:24:46 PDT
Created
attachment 20149
[details]
testcase showing problem Check the testcase to see the problem. 'left' and 'top' are 'auto', but should instead be 100px, 12px, respectively. Aside from that, the value for margin is empty. The value should be either 1 or four values. This is not a spec, it's just what I say. 1 value or four values. That is easier for scripts to deal with value.split(' ");
Dave Hyatt
Comment 2
2008-03-28 11:59:49 PDT
The issue is that the div is not positioned.
Garrett Smith
Comment 3
2008-03-28 23:01:48 PDT
Created
attachment 20185
[details]
position: relative, left is still auto When the element has position: relative, the computed left value is 0, however, webkit will return 'auto'. "If both 'left' and 'right' are 'auto' (their initial values), the computed values are '0' (i.e., the boxes stay in their original position)."
http://www.w3.org/TR/CSS21/visuren.html#relative-positioning
Ahmad Saleem
Comment 4
2022-07-25 16:59:36 PDT
I am unable to reproduce this bug in Safari 15.6 on macOS 12.5 and in both test cases, all browsers are giving same output: Test Case 1 (testcase showing..) - 100px, 12px, 1px, 1px; Test Case 2 (position..) - 0px, 0px, 1px, 1px; Since all browsers are matching, can this be marked as "RESOLVED CONFIGURATION CHANGED" or as such. Thanks!
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug