Starting with the introduction of vendor prefixes, detecting the support of a particular CSS property has become more complicated. Indeed, you need to test more values to check if the browser supports that CSS rule.
However, most of the times you only need to get the (un)prefixed name of one particular property, for instance the
transform one. So, loading the whole Modernizr build (or event the custom build) feels a bit exaggerated for a single test.
In order to check the support of a css property (and save some bytes without loading Modernizr) you can use this simple function:
This function will create a dummy element and it will check the default value of these (un)prefixed properties. The first one that is not
undefined will be returned (or
false if no one is available).
Obviously, this function expects the right input to work.
If you need to detect some more complex properties (like
flexbox), I would suggest you to check out the Modernizr source code because there are quirks and implementation bugs to be aware of.