From: Bartosz DziewoƄski Date: Mon, 23 Mar 2015 20:55:12 +0000 (+0100) Subject: ResourceLoaderImageModule: Synchronize CSS with .background-image-svg LESS mixin X-Git-Tag: 1.31.0-rc.0~12008 X-Git-Url: http://git.cyclocoop.org/%27%2C%20%20%20quote_amp%28%24url%29%2C%20%20%20%27?a=commitdiff_plain;h=a71167895c373ae505be6a8bc6f217d46a2d1abb;p=lhc%2Fweb%2Fwiklou.git ResourceLoaderImageModule: Synchronize CSS with .background-image-svg LESS mixin Bug: T87504 Change-Id: I790bd953fabbd4ff03f15c94fe101e2f65891520 --- diff --git a/includes/resourceloader/ResourceLoaderImageModule.php b/includes/resourceloader/ResourceLoaderImageModule.php index 8fbe4975cb..5be4419c11 100644 --- a/includes/resourceloader/ResourceLoaderImageModule.php +++ b/includes/resourceloader/ResourceLoaderImageModule.php @@ -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);", ); }