louisremi / background-size-polyfill

Adds support for background-size "cover" and "contain" to IE8
http://louisremi.github.com/background-size-polyfill/
MIT License
1.26k stars 359 forks source link

expando.backgroundPosition{X,Y} wrong if e.g. set to 'top' #24

Closed tec closed 11 years ago

tec commented 11 years ago

if pos[1] is 'top', positions[pos[1]] evaluates to zero, which is falsy. Then backgroundPositionY will be set to parseFloat("top") / 100 == NaN

jefferyto commented 11 years ago

Thanks for submitting this! This issue should be fixed in 0.2.0; your PR is still appreciated :-)