From: Mohamed Magdy Date: Sat, 21 Feb 2009 15:03:54 +0000 (+0000) Subject: Fix bug 1061 CSS-added icons next to links display through the text and makes it... X-Git-Tag: 1.31.0-rc.0~42743 X-Git-Url: https://git.cyclocoop.org/admin/?a=commitdiff_plain;h=3a21f312ad2fc7e94204ec59581287b237ee0d50;p=lhc%2Fweb%2Fwiklou.git Fix bug 1061 CSS-added icons next to links display through the text and makes it unreadable in RTL Patch by Ahmad Sherif --- diff --git a/RELEASE-NOTES b/RELEASE-NOTES index f6c9175d80..cb4546c5eb 100644 --- a/RELEASE-NOTES +++ b/RELEASE-NOTES @@ -209,6 +209,7 @@ it from source control: http://www.mediawiki.org/wiki/Download_from_SVN * (bug 17538) Use shorter URLs in 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 diff --git a/skins/common/wikibits.js b/skins/common/wikibits.js index 5abd73888f..1881cd9522 100644 --- a/skins/common/wikibits.js +++ b/skins/common/wikibits.js @@ -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 index 0000000000..dcf54178b7 --- /dev/null +++ b/skins/monobook/FF2Fixes.css @@ -0,0 +1,4 @@ +.rtl .external, a.feedlink { + padding: 0 !important; + background: none !important; +} diff --git a/skins/monobook/IE60Fixes.css b/skins/monobook/IE60Fixes.css index bf78413d8b..c373393d6c 100644 --- a/skins/monobook/IE60Fixes.css +++ b/skins/monobook/IE60Fixes.css @@ -61,6 +61,17 @@ 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 { diff --git a/skins/monobook/IE70Fixes.css b/skins/monobook/IE70Fixes.css index 43ff7076d5..d31a47a203 100644 --- a/skins/monobook/IE70Fixes.css +++ b/skins/monobook/IE70Fixes.css @@ -18,6 +18,16 @@ 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 { diff --git a/skins/monobook/Opera6Fixes.css b/skins/monobook/Opera6Fixes.css index 88704739ae..48b67bfdd6 100644 --- a/skins/monobook/Opera6Fixes.css +++ b/skins/monobook/Opera6Fixes.css @@ -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; +} diff --git a/skins/monobook/Opera7Fixes.css b/skins/monobook/Opera7Fixes.css index 446ea44cdb..4ec7ec0d04 100644 --- a/skins/monobook/Opera7Fixes.css +++ b/skins/monobook/Opera7Fixes.css @@ -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 index 0000000000..fff26a4058 --- /dev/null +++ b/skins/monobook/Opera9Fixes.css @@ -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 index 0000000000..c5cd84db02 Binary files /dev/null and b/skins/monobook/external-rtl.png differ diff --git a/skins/monobook/main.css b/skins/monobook/main.css index 63ce572cc7..56a50cdb01 100644 --- a/skins/monobook/main.css +++ b/skins/monobook/main.css @@ -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 */ diff --git a/skins/monobook/rtl.css b/skins/monobook/rtl.css index 60ffb4699b..9b8e4f44d4 100644 --- a/skins/monobook/rtl.css +++ b/skins/monobook/rtl.css @@ -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; }