ResourceLoaderImageModule: Synchronize CSS with .background-image-svg LESS mixin
authorBartosz Dziewoński <matma.rex@gmail.com>
Mon, 23 Mar 2015 20:55:12 +0000 (21:55 +0100)
committerUmherirrender <umherirrender_de.wp@web.de>
Tue, 24 Mar 2015 18:54:04 +0000 (18:54 +0000)
Bug: T87504
Change-Id: I790bd953fabbd4ff03f15c94fe101e2f65891520

includes/resourceloader/ResourceLoaderImageModule.php

index 8fbe497..5be4419 100644 (file)
@@ -264,18 +264,23 @@ class ResourceLoaderImageModule extends ResourceLoaderModule {
        }
 
        /**
+        * SVG support using a transparent gradient to guarantee cross-browser
+        * compatibility (browsers able to understand gradient syntax support also SVG).
+        * http://pauginer.tumblr.com/post/36614680636/invisible-gradient-technique
+        *
+        * Keep synchronized with the .background-image-svg LESS mixin in
+        * /resources/src/mediawiki.less/mediawiki.mixins.less.
+        *
         * @param string $primary Primary URI
         * @param string $fallback Fallback URI
         * @return string[] CSS declarations to use given URIs as background-image
         */
        protected function getCssDeclarations( $primary, $fallback ) {
-               // SVG support using a transparent gradient to guarantee cross-browser
-               // compatibility (browsers able to understand gradient syntax support also SVG).
-               // http://pauginer.tumblr.com/post/36614680636/invisible-gradient-technique
                return array(
                        "background-image: url($fallback);",
                        "background-image: -webkit-linear-gradient(transparent, transparent), url($primary);",
                        "background-image: linear-gradient(transparent, transparent), url($primary);",
+                       "background-image: -o-linear-gradient(transparent, transparent), url($fallback);",
                );
        }