Skip to content

Instantly share code, notes, and snippets.

@peterhartree
Created June 10, 2013 13:12
Show Gist options
  • Save peterhartree/5748599 to your computer and use it in GitHub Desktop.
Save peterhartree/5748599 to your computer and use it in GitHub Desktop.
Text-stroke feature detect for use with Modernizr.js
/*!
{
"name": "CSS text-stroke",
"property": "text-stroke",
"caniuse": "css-text-stroke",
"tags": ["css"],
"knownBugs": ["None"]
}
!*/
Modernizr.addTest('textstroke', function() {
var h1 = document.createElement('h1');
return !(!('webkitTextStroke' in h1.style) && !('textStroke' in h1.style));
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment