r96263 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r96262‎ | r96263 | r96264 >
Date:22:05, 4 September 2011
Author:robin
Status:ok (Comments)
Tags:
Comment:
Fix r96261: don't add important if 'none', so it doesn't break underlining on hover
Modified paths:
  • /trunk/phase3/includes/resourceloader/ResourceLoaderUserOptionsModule.php (modified) (history)
  • /trunk/phase3/skins/Simple.php (modified) (history)

Diff [purge]

Index: trunk/phase3/skins/Simple.php
@@ -35,7 +35,7 @@
3636 $underline = "";
3737
3838 if ( $wgUser->getOption( 'underline' ) < 2 ) {
39 - $underline = "text-decoration: " . $wgUser->getOption( 'underline' ) ? 'underline' : 'none' . " !important;";
 39+ $underline = "text-decoration: " . $wgUser->getOption( 'underline' ) ? 'underline !important' : 'none' . ";";
4040 }
4141
4242 /* Also inherits from resourceloader */
Index: trunk/phase3/includes/resourceloader/ResourceLoaderUserOptionsModule.php
@@ -97,7 +97,7 @@
9898 // Underline: 2 = browser default, 1 = always, 0 = never
9999 if ( $options['underline'] < 2 ) {
100100 $rules[] = "a { text-decoration: " .
101 - ( $options['underline'] ? 'underline' : 'none' ) . " !important; }";
 101+ ( $options['underline'] ? 'underline !important' : 'none' ) . "; }";
102102 }
103103 if ( $options['highlightbroken'] ) {
104104 $rules[] = "a.new, #quickbar a.new { color: #ba0000; }\n";

Follow-up revisions

RevisionCommit summaryAuthorDate
r96842REL1_18: MFT r93288, r94212, r96261, r96263, r96384reedy14:42, 12 September 2011

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r96261* Mark underline css as !important. It should override other css (such as the...robin21:50, 4 September 2011

Comments

#Comment by SPQRobin (talk | contribs)   22:07, 4 September 2011

.. assuming that always underlining on hover is the intended behavior

#Comment by Krinkle (talk | contribs)   22:29, 4 September 2011

Sure. Also note that this code is only ran if underline-pref is < 2. So it doesn't output anything if the preference is set to '2' (which is the browser default, and the MediaWiki default as well).

Marking OK.

Status & tagging log