Is there a way to feature-detect CSS3 resize on iframes?

256 views Asked by At

I have an iframe that is using the CSS3 resize style declaration:

iframe {
    resize: both;
}

I am using Modernizr to detect whether cssresize is supported in the browser so I can use the jQuery UI Resizable plugin in its place when the test fails.

However, Firefox doesn't seem to support CSS resize on iframes (JSFiddle), and yet the Modernizr test passes anyway because Firefox does support textarea resizing. This leaves my iframe on Firefox without any CSS or JS resizing capability.

How can I use feature detection to ensure that the browser supports CSS3 resize on iframes?

1

There are 1 answers

2
Eli Gassert On

modernizr lets you create your own custom rules. create one called iframecssresize that also checks that the browser + browser version is supported in addidtion to the cssresize feature is supported.

http://modernizr.com/docs/#addtest