Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

background-size:cover test returns wrong result in FF and Opera #527

Merged
merged 1 commit into from May 11, 2012

Conversation

Projects
None yet
4 participants
Contributor

bastimeyer commented Mar 20, 2012

Hello,
I've noticed a bug in the background-size:cover feature detection test...

The current implementation is testing for the value of the "background-size" key of the CSSStyleDeclaration object (getComputedStyle) to be equal to the string "cover". But the right name of this css property is "backgroundSize" and so the result of the test is wrong in all browsers except chrome. Here both keys "background-size" and "backgroundSize" exist and so there is no problem.

To fix this issue, simply change the key "background-size" to "backgroundSize".

vxsx commented Apr 2, 2012

@paulirish maybe someone could merge it?

1st8 commented Apr 2, 2012

+1

Owner

paulirish commented May 11, 2012

Looks good. Fixes #523 too.

@paulirish paulirish added a commit that referenced this pull request May 11, 2012

@paulirish paulirish Merge pull request #527 from bastimeyer/master
background-size:cover test returns wrong result in FF and Opera
82e474b

@paulirish paulirish merged commit 82e474b into Modernizr:master May 11, 2012

@patrickkettner patrickkettner pushed a commit to patrickkettner/Modernizr that referenced this pull request Feb 22, 2015

@paulirish paulirish Merge pull request #527 from bastimeyer/master
background-size:cover test returns wrong result in FF and Opera
84955cf
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment