Created
February 14, 2012 16:29
-
-
Save trey/1827930 to your computer and use it in GitHub Desktop.
Detect webkit image masks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Detect CSS mask support and hack it into Modernizr | |
if ( document.body.style[ '-webkit-mask-repeat' ] !== undefined ) { | |
Modernizr.cssmasks = true; | |
$('html').addClass('cssmasks'); | |
} else { | |
Modernizr.cssmasks = false; | |
$('html').addClass('no-cssmasks'); | |
} |
Apparently, this is available in the community add-ons when configuring Modernizr.
@postpostmodern, if you can get that to work, let me know. I had no luck. Firefox returned true.
Oh. I just saw it in the config. I hadn't actually tried it.
still not fixed=(
thanks for the suggestion. fixed it upstream: Modernizr/Modernizr@2d3a32c...314ceda
@paulirish Awesome! Thanks.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Thanks to @zenworm for pointing me to this code.