r91499 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r91498‎ | r91499 | r91500 >
Date:22:03, 5 July 2011
Author:kaldari
Status:resolved (Comments)
Tags:
Comment:
another fix for old jQuery UI on live
Modified paths:
  • /trunk/phase3/resources/jquery.ui/themes/vector/jquery.ui.button.css (modified) (history)

Diff [purge]

Index: trunk/phase3/resources/jquery.ui/themes/vector/jquery.ui.button.css
@@ -23,8 +23,8 @@
2424 /*button icon element(s) */
2525 .ui-button-icon-only .ui-icon, .ui-button-text-icon-primary .ui-icon, .ui-button-text-icon-secondary .ui-icon, .ui-button-text-icons .ui-icon, .ui-button-text-icon .ui-icon, .ui-button-icons-only .ui-icon { position: absolute; top: 50%; margin-top: -9px; }
2626 .ui-button-icon-only .ui-icon { left: 50%; margin-left: -8px; }
27 -.ui-button-text-icon .ui-button-icon-primary, .ui-button-text-icons .ui-button-icon-primary, .ui-button-icons-only .ui-button-icon-primary { left: .5em; }
28 -.ui-button-text-icons .ui-button-icon-secondary, .ui-button-icons-only .ui-button-icon-secondary { right: .5em; }
 27+.ui-button-text-icon-primary .ui-button-icon-primary, .ui-button-text-icon .ui-button-icon-primary, .ui-button-text-icons .ui-button-icon-primary, .ui-button-icons-only .ui-button-icon-primary { left: 0; }
 28+.ui-button-text-icon-secondary .ui-button-icon-secondary, .ui-button-text-icon .ui-button-icon-secondary, .ui-button-text-icons .ui-button-icon-secondary, .ui-button-icons-only .ui-button-icon-secondary { right: 16px; }
2929
3030 /*button sets*/
3131 .ui-buttonset { margin-right: 7px; }

Follow-up revisions

RevisionCommit summaryAuthorDate
r92846follow-up to r91499 - set padding for the elements inside the button rather t...kaldari02:11, 22 July 2011
r949471.17wmf1: MFT r91499, r92846catrope21:13, 18 August 2011

Comments

#Comment by Krinkle (talk | contribs)   18:17, 6 July 2011

Change (not to self):

1:

  • Prepends selectors: .ui-button-text-icon-primary .ui-button-icon-primary
  • Change left from 0.5em to 0

2:

  • Prepends selectors: .ui-button-text-icon-secondary .ui-button-icon-secondary, .ui-button-text-icon .ui-button-icon-secondary
  • Change right from 0.5em to 16px
#Comment by Krinkle (talk | contribs)   18:17, 6 July 2011

Changed (note to self):

1:

  • Prepends selectors: .ui-button-text-icon-primary .ui-button-icon-primary
  • Change left from 0.5em to 0

2:

  • Prepends selectors: .ui-button-text-icon-secondary .ui-button-icon-secondary, .ui-button-text-icon .ui-button-icon-secondary
  • Change right from 0.5em to 16px
#Comment by Kaldari (talk | contribs)   23:32, 19 July 2011

The icons are always 16px by 16px. Thus, if they appear on the left side of the button (primary), they should be flush left (left:0). If they appear on the right side of the button (secondary), they should be 16px from the right (right:16px).

The extra selectors are to make sure that all cases are treated the same. It may actually make sense to just condense these into 2 selectors (.ui-button-text-icon-primary and .ui-button-text-icon-secondary), but I was trying to keep the change as minimal as possible.

#Comment by Kaldari (talk | contribs)   01:11, 22 July 2011

In case that's confusing, "right:16px" is flush right for a 16px element.

#Comment by Kaldari (talk | contribs)   02:14, 22 July 2011

Actually, that's wrong. The padding on the button itself was messing up the positioning of the icons. This rev is the wrong way to fix it. The correct fix is r92846, which is how jquery.ui skins normally deal with this.

Status & tagging log