Can I tell if CSS filters are supported?

CSS Filter Effects is currently in draft, but chrome is already supported. This makes it possible to apply effects to images:

The CSS filter property provides effects, such as blurring or changing colors, to render elements before displaying the element. Filters are commonly used to customize the rendering of an image, background, or border.

The CSS standard includes several features that provide predefined effects. You can also link to the filter specified in the SVG with the URL of the SVG filter element. ( source )

As far as I know, CSS filter effects are only supported in Chrome 18+, however, is it possible to detect the presence of CSS filter effects through JavaScript or some CSS tricks?

+5
source share
1 answer

You can use the Modernizr Javascript library to detect CSS3 functions. I suppose.

According to the following links (starting with Modernizr 2.6), Modernizr can now be used to detect a CSS filter:

http://www.browserleaks.com/modernizr#filter

http://modernizr.com/news/ (in the test improvement section).

and http://modernizr.com/news/modernizr-260/ .

+10
source

All Articles