Follow-up 23cfe1bba: harmonize image embedding CSS
authorRoan Kattouw <roan.kattouw@gmail.com>
Mon, 14 Dec 2015 23:58:41 +0000 (15:58 -0800)
committerRoan Kattouw <roan.kattouw@gmail.com>
Tue, 15 Dec 2015 00:00:49 +0000 (16:00 -0800)
23cfe1bba changed ResourceLoaderImageModule::getCssDeclarations(),
but contrary to the documentation did not synchronize it with
mediawiki.mixins.less. This commit does that.

This commit brings the -o-linear-gradient rule back (this time with
a comment that explains why it's there), and removes the
-webkit-linear-gradient rules from mediawiki.mixins.less
and CSS code that copypasted it.

Change-Id: Ia7e9738d90919248748e6968192bf02e420cddd0

includes/resourceloader/ResourceLoaderImageModule.php
resources/src/mediawiki.action/mediawiki.action.view.redirectPage.css
resources/src/mediawiki.legacy/oldshared.css
resources/src/mediawiki.less/mediawiki.mixins.less
resources/src/mediawiki.skinning/content.css
resources/src/mediawiki.skinning/content.externallinks.css
resources/src/mediawiki/mediawiki.feedlink.css
resources/src/mediawiki/mediawiki.htmlform.css

index 73eb8a7..27e1201 100644 (file)
@@ -372,6 +372,8 @@ class ResourceLoaderImageModule extends ResourceLoaderModule {
                return array(
                        "background-image: url($fallback);",
                        "background-image: linear-gradient(transparent, transparent), url($primary);",
+                       // Do not serve SVG to Opera 12, bad rendering with border-radius or background-size (T87504)
+                       "background-image: -o-linear-gradient(transparent, transparent), url($fallback);",
                );
        }
 
index a92f1c1..03a9f76 100644 (file)
@@ -26,8 +26,6 @@
        padding-left: 42px;
        background: transparent url(images/nextredirect-ltr.png) bottom left no-repeat;
        /* @embed */
-       background-image: -webkit-linear-gradient(transparent, transparent), url(images/nextredirect-ltr.svg);
-       /* @embed */
        background-image: linear-gradient(transparent, transparent), url(images/nextredirect-ltr.svg);
 }
 
@@ -36,8 +34,6 @@
        padding-left: 47px;
        background: transparent url(images/redirect-ltr.png) bottom left no-repeat;
        /* @embed */
-       background-image: -webkit-linear-gradient(transparent, transparent), url(images/redirect-ltr.svg);
-       /* @embed */
        background-image: linear-gradient(transparent, transparent), url(images/redirect-ltr.svg);
 }
 
@@ -49,8 +45,6 @@
        padding-right: 42px;
        background: transparent url(images/nextredirect-rtl.png) bottom right no-repeat;
        /* @embed */
-       background-image: -webkit-linear-gradient(transparent, transparent), url(images/nextredirect-rtl.svg);
-       /* @embed */
        background-image: linear-gradient(transparent, transparent), url(images/nextredirect-rtl.svg);
 }
 
@@ -59,7 +53,5 @@
        padding-right: 47px;
        background: transparent url(images/redirect-rtl.png) bottom right no-repeat;
        /* @embed */
-       background-image: -webkit-linear-gradient(transparent, transparent), url(images/redirect-rtl.svg);
-       /* @embed */
        background-image: linear-gradient(transparent, transparent), url(images/redirect-rtl.svg);
 }
index 77391d7..5d637da 100644 (file)
@@ -122,8 +122,6 @@ div.magnify a {
        /* Use same SVG support hack as mediawiki.legacy's shared.css */
        background: url(images/magnify-clip-ltr.png) center center no-repeat;
        /* @embed */
-       background-image: -webkit-linear-gradient(transparent, transparent), url(images/magnify-clip-ltr.svg);
-       /* @embed */
        background-image: linear-gradient(transparent, transparent), url(images/magnify-clip-ltr.svg);
        /* Don't annoy people who copy-paste everything too much */
        -moz-user-select: none;
index 43bd21a..690be56 100644 (file)
@@ -39,7 +39,6 @@
 // is not worth the harm done to modern ones.
 .background-image-svg(@svg, @fallback) {
        background-image: url(@fallback);
-       background-image: -webkit-linear-gradient(transparent, transparent), e('/* @embed */') url(@svg);
        background-image: linear-gradient(transparent, transparent), e('/* @embed */') url(@svg);
        // Do not serve SVG to Opera 12, bad rendering with border-radius or background-size (T87504)
        background-image: -o-linear-gradient(transparent, transparent), url(@fallback);
index b069e50..c88d00d 100644 (file)
@@ -178,8 +178,6 @@ div.magnify a {
        /* Use same SVG support hack as mediawiki.legacy's shared.css */
        background-image: url(images/magnify-clip-ltr.png);
        /* @embed */
-       background-image: -webkit-linear-gradient(transparent, transparent), url(images/magnify-clip-ltr.svg);
-       /* @embed */
        background-image: linear-gradient(transparent, transparent), url(images/magnify-clip-ltr.svg);
        /* Don't annoy people who copy-paste everything too much */
        -moz-user-select: none;
@@ -211,8 +209,6 @@ img.thumbborder {
        /* Use same SVG support hack as mediawiki.legacy's shared.css */
        background-image: url(images/magnify-clip-ltr.png);
        /* @embed */
-       background-image: -webkit-linear-gradient(transparent, transparent), url(images/magnify-clip-ltr.svg);
-       /* @embed */
        background-image: linear-gradient(transparent, transparent), url(images/magnify-clip-ltr.svg);
 }
 
@@ -233,8 +229,6 @@ img.thumbborder {
        /* Use same SVG support hack as mediawiki.legacy's shared.css */
        background-image: url(images/magnify-clip-rtl.png);
        /* @embed */
-       background-image: -webkit-linear-gradient(transparent, transparent), url(images/magnify-clip-rtl.svg);
-       /* @embed */
        background-image: linear-gradient(transparent, transparent), url(images/magnify-clip-rtl.svg);
 }
 
index d23540d..8890cbb 100644 (file)
@@ -23,8 +23,6 @@
 .link-mailto {
        background: url(images/mail.png) center right no-repeat;
        /* @embed */
-       background-image: -webkit-linear-gradient(transparent, transparent), url(images/mail.svg);
-       /* @embed */
        background-image: linear-gradient(transparent, transparent), url(images/mail.svg);
        padding-right: 15px;
 }
@@ -33,8 +31,6 @@
 .link-ftp {
        background: url(images/ftp-ltr.png) center right no-repeat;
        /* @embed */
-       background-image: -webkit-linear-gradient(transparent, transparent), url(images/ftp-ltr.svg);
-       /* @embed */
        background-image: linear-gradient(transparent, transparent), url(images/ftp-ltr.svg);
        padding-right: 15px;
 }
@@ -44,8 +40,6 @@
 .link-irc {
        background: url(images/chat-ltr.png) center right no-repeat;
        /* @embed */
-       background-image: -webkit-linear-gradient(transparent, transparent), url(images/chat-ltr.svg);
-       /* @embed */
        background-image: linear-gradient(transparent, transparent), url(images/chat-ltr.svg);
        padding-right: 15px;
 }
@@ -59,8 +53,6 @@
 .link-audio {
        background: url(images/audio-ltr.png) center right no-repeat;
        /* @embed */
-       background-image: -webkit-linear-gradient(transparent, transparent), url(images/audio-ltr.svg);
-       /* @embed */
        background-image: linear-gradient(transparent, transparent), url(images/audio-ltr.svg);
        padding-right: 15px;
 }
@@ -72,8 +64,6 @@
 .link-video {
        background: url(images/video.png) center right no-repeat;
        /* @embed */
-       background-image: -webkit-linear-gradient(transparent, transparent), url(images/video.svg);
-       /* @embed */
        background-image: linear-gradient(transparent, transparent), url(images/video.svg);
        padding-right: 15px;
 }
@@ -84,8 +74,6 @@
 .link-document {
        background: url(images/document-ltr.png) center right no-repeat;
        /* @embed */
-       background-image: -webkit-linear-gradient(transparent, transparent), url(images/document-ltr.svg);
-       /* @embed */
        background-image: linear-gradient(transparent, transparent), url(images/document-ltr.svg);
        padding-right: 15px;
 }
index a07a403..4a2a367 100644 (file)
@@ -6,8 +6,6 @@ a.feedlink {
         * http://pauginer.tumblr.com/post/36614680636/invisible-gradient-technique */
        background-image: url(images/feed-icon.png);
        /* @embed */
-       background-image: -webkit-linear-gradient(transparent, transparent), url(images/feed-icon.svg);
-       /* @embed */
        background-image: linear-gradient(transparent, transparent), url(images/feed-icon.svg);
        background-position: center left;
        background-repeat: no-repeat;
index 765e92f..c3341bb 100644 (file)
@@ -31,8 +31,6 @@ tr.mw-htmlform-vertical-label td.mw-label {
         * http://pauginer.tumblr.com/post/36614680636/invisible-gradient-technique */
        background-image: url(images/question.png);
        /* @embed */
-       background-image: -webkit-linear-gradient(transparent, transparent), url(images/question.svg);
-       /* @embed */
        background-image: linear-gradient(transparent, transparent), url(images/question.svg);
        background-repeat: no-repeat;
        background-size: 13px 13px;