Permalink
Browse files

Fix calculation of background-size horizontal dimension. Fixes issue #…

  • Loading branch information...
lojjic committed Feb 19, 2013
1 parent 58aebcb commit 577696d91ded37c8753d8421d633a0f757d54590
Showing with 2 additions and 2 deletions.
  1. +2 −2 sources/BackgroundStyleInfo.js
@@ -387,15 +387,15 @@ PIE.BackgroundStyleInfo = PIE.StyleInfoBase.newStyleInfo( {
if( bgOrigin !== 'border-box' ) {
borders = borderInfo.getProps();
if( borders && ( borders = borders.widths ) ) {
- w -= borders[ 'l' ].pixels( el ) + borders[ 'l' ].pixels( el );
+ w -= borders[ 'l' ].pixels( el ) + borders[ 'r' ].pixels( el );
h -= borders[ 't' ].pixels( el ) + borders[ 'b' ].pixels( el );
}
}
if ( bgOrigin === 'content-box' ) {
paddings = paddingInfo.getProps();
if ( paddings ) {
- w -= paddings[ 'l' ].pixels( el ) + paddings[ 'l' ].pixels( el );
+ w -= paddings[ 'l' ].pixels( el ) + paddings[ 'r' ].pixels( el );
h -= paddings[ 't' ].pixels( el ) + paddings[ 'b' ].pixels( el );
}
}

0 comments on commit 577696d

Please sign in to comment.