Skip to content

Instantly share code, notes, and snippets.

@jonathantneal
Created December 13, 2011 03:55
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jonathantneal/1470485 to your computer and use it in GitHub Desktop.
Save jonathantneal/1470485 to your computer and use it in GitHub Desktop.
getVendorPrefix.js
var vendorPrefix = (function (de, e, cs) {
var prefix = ((cs(de.appendChild(e)).cssText || '').match(/\W-[^-]+/) || [''])[0].substr(2);
de.removeChild(de.lastChild);
return prefix;
})(document.documentElement, document.createElement('a'), window.getComputedStyle || function (e) { return e.currentStyle; });
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment