UNPKG

modernizr

Version:

Modernizr is a JavaScript library that detects HTML5 and CSS3 features in the user’s browser.

36 lines (34 loc) 1.29 kB
define(['ModernizrProto', 'prefixed', 'domToCSS'], function(ModernizrProto, prefixed, domToCSS) { /** * prefixedCSS is just like [prefixed](#modernizr-prefixed), but the returned values are in * hyphen-case (e.g. `box-sizing`) rather than camelCase (boxSizing). * * @memberOf Modernizr * @name Modernizr.prefixedCSS * @optionName Modernizr.prefixedCSS() * @optionProp prefixedCSS * @access public * @function prefixedCSS * @param {string} prop - String name of the property to test for * @returns {string|boolean} The string representing the (possibly prefixed) * valid version of the property, or `false` when it is unsupported. * @example * * `Modernizr.prefixedCSS` is like `Modernizr.prefixed`, but returns the result * in hyphenated form * * ```js * Modernizr.prefixedCSS('transition') // '-moz-transition' in old Firefox * ``` * * Since it is only useful for CSS style properties, it can only be tested against * an HTMLElement. * * Properties can be passed as both the DOM style camelCase or CSS style hyphen-case. */ var prefixedCSS = ModernizrProto.prefixedCSS = function(prop) { var prefixedProp = prefixed(prop); return prefixedProp && domToCSS(prefixedProp); }; return prefixedCSS; });