Closed
Bug 93437
Opened 23 years ago
Closed 23 years ago
getComputedStyle returns relative values instead of absolute ones
Categories
(Core :: DOM: CSS Object Model, defect)
Core
DOM: CSS Object Model
Tracking
()
VERIFIED
INVALID
People
(Reporter: andorxor, Assigned: jst)
Details
Attachments
(1 file)
1.37 KB,
text/html
|
Details |
getComputedStyle returns relative values for left and top when a nested object's position is declared as "absolute", but getComputedStyle should return absolute values (relative to the document). Netscape 6 hadn't this bug. See http://www.w3.org/TR/2000/REC-DOM-Level-2-Style-20001113/css.html#CSS- OverrideAndComputed and the attached testcase.
Reporter | ||
Comment 1•23 years ago
|
||
Comment 2•23 years ago
|
||
er... wouldn't getComputedStyle return top and left relative to the containing block? That's what those offsets are measured with respect to when those properties are set.... I believe this is invalid.
Reporter | ||
Comment 3•23 years ago
|
||
The DOM specification (see the link in my my bug report) says -- getComputedStyle: (...) Return Value: CSSStyleDeclaration The computed style. The CSSStyleDeclaration is read-only and contains only _absolute_ values. -- And as I said, that was the behaviour until recently...
No, this in INVALID. Sorry for misunderstanding what you were talking about earlier. The computed value of 'top' is still '50px', since top means the offset from the containing block, which in this case is the outer positioned element and not the viewport (which it is when there is no intervening positioned element).
Status: UNCONFIRMED → RESOLVED
Closed: 23 years ago
Resolution: --- → INVALID
Comment 5•23 years ago
|
||
VERIFIED -- 'px' is an absolute unit, as opposed to 'em' and 'ex' which are relative. That's what the spec is referring to.
Status: RESOLVED → VERIFIED
You need to log in
before you can comment on or make changes to this bug.
Description
•