Skip to content
New issue

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

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

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

bastimeyer
Copy link
Contributor

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
Copy link

vxsx commented Apr 2, 2012

@paulirish maybe someone could merge it?

@1st8
Copy link

1st8 commented Apr 2, 2012

+1

@paulirish
Copy link
Member

Looks good. Fixes #523 too.

paulirish added a commit that referenced this pull request May 11, 2012
background-size:cover test returns wrong result in FF and Opera
@paulirish paulirish merged commit 82e474b into Modernizr:master May 11, 2012
patrickkettner pushed a commit to patrickkettner/Modernizr that referenced this pull request Feb 22, 2015
background-size:cover test returns wrong result in FF and Opera
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants