Fix bug 1061 CSS-added icons next to links display through the text and makes it...
authorMohamed Magdy <alnokta@users.mediawiki.org>
Sat, 21 Feb 2009 15:03:54 +0000 (15:03 +0000)
committerMohamed Magdy <alnokta@users.mediawiki.org>
Sat, 21 Feb 2009 15:03:54 +0000 (15:03 +0000)
Patch by Ahmad Sherif

RELEASE-NOTES
skins/common/wikibits.js
skins/monobook/FF2Fixes.css [new file with mode: 0644]
skins/monobook/IE60Fixes.css
skins/monobook/IE70Fixes.css
skins/monobook/Opera6Fixes.css
skins/monobook/Opera7Fixes.css
skins/monobook/Opera9Fixes.css [new file with mode: 0644]
skins/monobook/external-rtl.png [new file with mode: 0644]
skins/monobook/main.css
skins/monobook/rtl.css

index f6c9175..cb4546c 100644 (file)
@@ -209,6 +209,7 @@ it from source control: http://www.mediawiki.org/wiki/Download_from_SVN
 * (bug 17538) Use shorter URLs in <link> elements
 * (bug 13778) Hidden input added to the search form so that using the Enter key
   on IE will do a fulltext search like clicking the button does
+* (bug 1061) CSS-added icons next to links display through the text and makes it unreadable in RTL
 
 == API changes in 1.15 ==
 * (bug 16858) Revamped list=deletedrevs to make listing deleted contributions
index 5abd738..1881cd9 100644 (file)
@@ -14,6 +14,7 @@ var is_khtml = navigator.vendor == 'KDE' ||
        ( document.childNodes && !document.all && !navigator.taintEnabled );
 // For accesskeys; note that FF3+ is included here!
 var is_ff2 = /firefox\/[2-9]|minefield\/3/.test( clientPC );
+var is_ff2_ = /firefox\/2/.test( clientPC );
 // These aren't used here, but some custom scripts rely on them
 var is_ff2_win = is_ff2 && clientPC.indexOf('windows') != -1;
 var is_ff2_x11 = is_ff2 && clientPC.indexOf('x11') != -1;
@@ -91,8 +92,12 @@ if (typeof stylepath != 'undefined' && typeof skin != 'undefined') {
                importStylesheetURI(stylepath+'/'+skin+'/Opera6Fixes.css');
        } else if (is_opera_seven && !is_opera_95) {
                importStylesheetURI(stylepath+'/'+skin+'/Opera7Fixes.css');
+       } else if (is_opera_95) {
+         importStylesheetURI(stylepath+'/'+skin+'/Opera9Fixes.css');
        } else if (is_khtml) {
                importStylesheetURI(stylepath+'/'+skin+'/KHTMLFixes.css');
+       } else if (is_ff2_) {
+         importStylesheetURI(stylepath+'/'+skin+'/FF2Fixes.css');
        }
 }
 
diff --git a/skins/monobook/FF2Fixes.css b/skins/monobook/FF2Fixes.css
new file mode 100644 (file)
index 0000000..dcf5417
--- /dev/null
@@ -0,0 +1,4 @@
+.rtl .external, a.feedlink {
+        padding: 0 !important;
+        background: none !important;
+}
index bf78413..c373393 100644 (file)
        padding-right: 13px;
 }
 
+.rtl #bodyContent a.external {
+  background-image: url(external-rtl.png);
+  padding-right: 13px;
+}
+
+.rtl a.feedlink {
+  background-position: right;
+  padding-right: 0;
+  padding-left: 16px;
+}
+
 /* show the hand */
 #p-logo a,
 #p-logo a:hover {
index 43ff707..d31a47a 100644 (file)
        margin-top: 160px;
 }
 
+.rtl #bodyContent a.external {
+  background-image: url(external-rtl.png);
+  padding: 0 13px 0 0;
+}
+
+.rtl a.feedlink {
+  background-position: right;
+  padding-right: 0;
+  padding-left: 16px;
+}
 /* the tabs */
 
 #p-cactions {
index 8870473..48b67bf 100644 (file)
@@ -12,3 +12,9 @@
        background: url(external.png) center right no-repeat;
        padding-right: 13px;
 }
+
+.rtl a.feedlink {
+  background-position: right;
+  padding-right: 0;
+  padding-left: 16px;
+}
index 446ea44..4ec7ec0 100644 (file)
@@ -9,3 +9,13 @@
        background: url(external.png) center right no-repeat;
        padding-right: 13px;
 }
+.rtl #bodyContent a.external {
+       background-image: url(external-rtl.png);
+       padding-right: 13px;
+}
+
+.rtl a.feedlink {
+  background-position: right;
+  padding-right: 0;
+  padding-left: 16px;
+}
diff --git a/skins/monobook/Opera9Fixes.css b/skins/monobook/Opera9Fixes.css
new file mode 100644 (file)
index 0000000..fff26a4
--- /dev/null
@@ -0,0 +1,11 @@
+.rtl #bodyContent a.external {
+  background-image: url(external-rtl.png);
+  padding-right: 0;
+  padding-left: 13px;
+}
+
+.rtl a.feedlink {
+  background-position: right;
+  padding-right: 0;
+  padding-left: 16px;
+}
diff --git a/skins/monobook/external-rtl.png b/skins/monobook/external-rtl.png
new file mode 100644 (file)
index 0000000..c5cd84d
Binary files /dev/null and b/skins/monobook/external-rtl.png differ
index 63ce572..56a50cd 100644 (file)
@@ -527,32 +527,35 @@ table.rimage {
 #bodyContent a.external,
 #bodyContent a[href ^="gopher://"] {
        background: url(external.png) center right no-repeat;
-       padding-right: 13px;
+       padding: 0 13px;
+}
+.rtl #bodyContent a[href ^="http://"] {
+       background-image: url(external-rtl.png);
 }
 #bodyContent a[href ^="https://"],
 .link-https {
        background: url(lock_icon.gif) center right no-repeat;
-       padding-right: 16px;
+       padding: 0 16px;
 }
 #bodyContent a[href ^="mailto:"],
 .link-mailto {
        background: url(mail_icon.gif) center right no-repeat;
-       padding-right: 18px;
+       padding: 0 18px;
 }
 #bodyContent a[href ^="news://"] {
        background: url(news_icon.png) center right no-repeat;
-       padding-right: 18px;
+       padding: 0 18px;
 }
 #bodyContent a[href ^="ftp://"],
 .link-ftp {
        background: url(file_icon.gif) center right no-repeat;
-       padding-right: 18px;
+       padding: 0 18px;
 }
 #bodyContent a[href ^="irc://"],
 #bodyContent a.extiw[href ^="irc://"],
 .link-irc {
        background: url(discussionitem_icon.gif) center right no-repeat;
-       padding-right: 18px;
+       padding: 0 18px;
 }
 #bodyContent a.external[href $=".ogg"], #bodyContent a.external[href $=".OGG"],
 #bodyContent a.external[href $=".mid"], #bodyContent a.external[href $=".MID"],
@@ -562,7 +565,7 @@ table.rimage {
 #bodyContent a.external[href $=".wma"], #bodyContent a.external[href $=".WMA"],
 .link-audio {
        background: url("audio.png") center right no-repeat;
-       padding-right: 13px;
+       padding: 0 13px;
 }
 #bodyContent a.external[href $=".ogm"], #bodyContent a.external[href $=".OGM"],
 #bodyContent a.external[href $=".avi"], #bodyContent a.external[href $=".AVI"],
@@ -570,14 +573,30 @@ table.rimage {
 #bodyContent a.external[href $=".mpg"], #bodyContent a.external[href $=".MPG"],
 .link-video {
        background: url("video.png") center right no-repeat;
-       padding-right: 13px;
+       padding: 0 13px;
 }
 #bodyContent a.external[href $=".pdf"], #bodyContent a.external[href $=".PDF"],
 #bodyContent a.external[href *=".pdf#"], #bodyContent a.external[href *=".PDF#"],
 #bodyContent a.external[href *=".pdf?"], #bodyContent a.external[href *=".PDF?"],
 .link-document {
        background: url("document.png") center right no-repeat;
-       padding-right: 12px;
+       padding: 0 12px;
+}
+
+/* for rtl wikis */
+.rtl #bodyContent a.external {
+       background-position: left;
+       padding-right: 0;
+}
+.rtl a.feedlink {
+  background-position: right;
+  padding-right: 16px;
+  padding-left: 0;
+}
+
+/* correction for ltr wikis */
+.ltr #bodyContent a.external {
+       padding-left: 0;
 }
 
 /* disable interwiki styling */
index 60ffb46..9b8e4f4 100644 (file)
@@ -147,11 +147,12 @@ li#ca-watch {
 #p-personal li {
        float: left;
 }
-/* Fix link icons */
+/* Fix link icons
 .external, a.feedlink {
        padding: 0 !important;
        background: none !important;
 }
+*/
 #footer {
        clear: both;
 }