Side navigation
#12088 closed bug (fixed)
Opened July 16, 2012 04:32PM UTC
Closed July 23, 2012 02:03AM UTC
Webkit now returning percentages for more getComputedStyle properties
| Reported by: | mikesherov | Owned by: | mikesherov |
|---|---|---|---|
| Priority: | high | Milestone: | 1.8 |
| Component: | css | Version: | git |
| Keywords: | Cc: | ||
| Blocked by: | Blocking: |
Description
Strangely, if an element has css 'min-width' value and a css margin value that is a %, in Safari (Version 5.1.7 (7534.57.2)), the returned value for $(element) is the 'min-width' value!
Attachments (0)
Change History (4)
Changed July 16, 2012 04:37PM UTC by comment:1
| component: | unfiled → css |
|---|---|
| milestone: | None → 1.8 |
| owner: | → mikesherov |
| priority: | undecided → high |
| status: | new → assigned |
Changed July 17, 2012 10:05PM UTC by comment:2
Changed July 20, 2012 12:12AM UTC by comment:3
// A tribute to the "awesome hack by Dean Edwards"
// WebKit uses "computed value (percentage if specified)" instead of "used value" for margins
// which is against the CSSOM draft spec: http://dev.w3.org/csswg/cssom/#resolved-values
if ( !jQuery.support.pixelMargin && rmargin.test( name ) && rnumnonpx.test( ret ) ) {
width = style.width;
style.width = ret;
ret = computed.width;
style.width = width;
}
}
return ret;