Firefox does not allow SVG filters loaded from domains != origin
authorAlexander Ebert <ebert@woltlab.com>
Thu, 4 Dec 2014 12:26:41 +0000 (13:26 +0100)
committerAlexander Ebert <ebert@woltlab.com>
Thu, 4 Dec 2014 12:26:41 +0000 (13:26 +0100)
Firefox 35+ seems to support the native filter property values, possibly remove the SVG filter at all: http://caniuse.com/#search=filter

wcfsetup/install/files/style/global.less

index 90e508f1f6a11474c2f9a47c78fba1c142d6fe3e..a12b13a194a9ab36ca4db96c5bf49caf89b80534 100644 (file)
@@ -200,7 +200,9 @@ body > iframe[src="about:blank"] {
 }
 
 .grayscale {
-       filter: url(../images/grayscale-filter.svg#grayscale);
+       //filter: url(../images/grayscale-filter.svg#grayscale);
+       // Firefox does not allow SVG filters to be retrieved from a different domain, embed it directly (Firefox 35+ seems to support the native property!)
+       filter: url(data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cfilter%20id%3D%22grayscale%22%3E%3CfeColorMatrix%20type%3D%22matrix%22%20values%3D%220.3333%200.3333%200.3333%200%200%200.3333%200.3333%200.3333%200%200%200.3333%200.3333%200.3333%200%200%200%200%200%201%200%22%2F%3E%3C%2Ffilter%3E%3C%2Fsvg%3E#grayscale);
        filter: gray;
        -webkit-filter: grayscale(1);
 }