Open Bug 1426510 Opened 8 years ago Updated 3 years ago

window.getComputedStyle().getPropertyValue('width') returns 0 for element with css width auto

Categories

(Core :: CSS Parsing and Computation, defect, P3)

57 Branch
x86_64
Windows 10
defect

Tracking

()

UNCONFIRMED

People

(Reporter: brianhewitt1, Unassigned)

Details

Attachments

(1 file)

User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:57.0) Gecko/20100101 Firefox/57.0 Build ID: 20171206182557 Steps to reproduce: img element with css height: 100%, width: auto container div css height: 150%, width auto js: parseInt(window.getComputedStyle(elem).getPropertyValue('width')) setting container position:relative does not alter result Actual results: returns 0 Expected results: return computed value (as show in box model computation)
Chrome returns computed value
OS: Unspecified → Windows 10
Hardware: Unspecified → x86_64
Component: Untriaged → CSS Parsing and Computation
Product: Firefox → Core
Could you provide an html test-case please, or an URL? That'd make this way easier.
Priority: -- → P1
Priority: P1 → P3
Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: