r74899 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r74898‎ | r74899 | r74900 >
Date:15:27, 17 October 2010
Author:hartman
Status:ok (Comments)
Tags:
Comment:
Don't set the padding of all sides of links with icons, only set the one that is actually needed.
Fixes bug 25548
Modified paths:
  • /trunk/phase3/skins/vector/screen.css (modified) (history)

Diff [purge]

Index: trunk/phase3/skins/vector/screen.css
@@ -1026,37 +1026,37 @@
10271027 div#content a[href ^="gopher://"] {
10281028 /* @embed */
10291029 background: url(images/external-link-ltr-icon.png) center right no-repeat;
1030 - padding: 0 13px 0 0;
 1030+ padding-right: 13px;
10311031 }
10321032 div#content a[href ^="https://"],
10331033 .link-https {
10341034 /* @embed */
10351035 background: url(images/lock-icon.png) center right no-repeat;
1036 - padding: 0 13px 0 0;
 1036+ padding-right: 13px;
10371037 }
10381038 div#content a[href ^="mailto:"],
10391039 .link-mailto {
10401040 /* @embed */
10411041 background: url(images/mail-icon.png) center right no-repeat;
1042 - padding: 0 13px 0 0;
 1042+ padding-right: 13px;
10431043 }
10441044 div#content a[href ^="news://"] {
10451045 /* @embed */
10461046 background: url(images/news-icon.png) center right no-repeat;
1047 - padding: 0 13px 0 0;
 1047+ padding-right: 13px;
10481048 }
10491049 div#content a[href ^="ftp://"],
10501050 .link-ftp {
10511051 /* @embed */
10521052 background: url(images/file-icon.png) center right no-repeat;
1053 - padding: 0 13px 0 0;
 1053+ padding-right: 13px;
10541054 }
10551055 div#content a[href ^="irc://"],
10561056 div#content a.extiw[href ^="irc://"],
10571057 .link-irc {
10581058 /* @embed */
10591059 background: url(images/talk-icon.png) center right no-repeat;
1060 - padding: 0 13px 0 0;
 1060+ padding-right: 13px;
10611061 }
10621062 div#content a.external[href $=".ogg"], div#content a.external[href $=".OGG"],
10631063 div#content a.external[href $=".mid"], div#content a.external[href $=".MID"],
@@ -1067,7 +1067,7 @@
10681068 .link-audio {
10691069 /* @embed */
10701070 background: url("images/audio-icon.png?2") center right no-repeat;
1071 - padding: 0 13px 0 0;
 1071+ padding-right: 13px;
10721072 }
10731073 div#content a.external[href $=".ogm"], div#content a.external[href $=".OGM"],
10741074 div#content a.external[href $=".avi"], div#content a.external[href $=".AVI"],
@@ -1076,7 +1076,7 @@
10771077 .link-video {
10781078 /* @embed */
10791079 background: url("images/video-icon.png?2") center right no-repeat;
1080 - padding: 0 13px 0 0;
 1080+ padding-right: 13px;
10811081 }
10821082 div#content a.external[href $=".pdf"], div#content a.external[href $=".PDF"],
10831083 div#content a.external[href *=".pdf#"], div#content a.external[href *=".PDF#"],
@@ -1084,7 +1084,7 @@
10851085 .link-document {
10861086 /* @embed */
10871087 background: url("images/document-icon.png?2") center right no-repeat;
1088 - padding: 0 13px 0 0;
 1088+ padding-right: 13px;
10891089 }
10901090 /* Interwiki Styling (Disabled) */
10911091 div#content a.extiw,

Comments

#Comment by Trevor Parscal (WMF) (talk | contribs)   00:03, 13 January 2011

This is sensible, but we should probably be setting them as padding: 13px 13px 0 13px; so we get vertical padding too - which on elements that are display: inline; results in their background images bleeding out into the padded space but does not affect their flow (this is only true for vertical padding). Our icons are pretty small, so in most cases no clipping is occurring, but it is possible - something to consider.

Status & tagging log