Skip to content

Instantly share code, notes, and snippets.

@trey
Created February 14, 2012 16:29
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save trey/1827930 to your computer and use it in GitHub Desktop.
Save trey/1827930 to your computer and use it in GitHub Desktop.
Detect webkit image masks
// 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');
}
@paulirish
Copy link

thanks for the suggestion. fixed it upstream: Modernizr/Modernizr@2d3a32c...314ceda

@trey
Copy link
Author

trey commented May 11, 2012

@paulirish Awesome! Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment