Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Fallback to fixed width values if aspect ratio is specified and width…

… is not (or auto)
  • Loading branch information...
commit a415a9217db0ecb2eaeed7b49b23461ec45710f8 1 parent 499216e
Thad Cox authored
Showing with 1 addition and 1 deletion.
  1. +1 −1  foresight.js
2  foresight.js
View
@@ -501,7 +501,7 @@
computedWidthValue = getComputedStyleValue( img, DIMENSION_WIDTH );
img.style[ STYLE_ATTRIBUTE_DISPLAY ] = oldDisplay;
- if ( computedWidthValue === 'auto' || computedWidthValue.indexOf( '%' ) > 0 ) {
+ if ( ( img[ ASPECT_RATIO] && computedWidthValue === 'auto' ) || computedWidthValue.indexOf( '%' ) > 0 ) {
// if the width has a percent value then change the display to
// display:block to help get correct browser pixel width
img.unitType = UNIT_TYPE_PERCENT;
Please sign in to comment.
Something went wrong with that request. Please try again.