r65391 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r65390‎ | r65391 | r65392 >
Date:14:19, 21 April 2010
Author:tparscal
Status:resolved (Comments)
Tags:
Comment:
Actually fix bug #20706 - Next time I will read more carefully and test more thouroughly...
Modified paths:
  • /trunk/phase3/includes/DefaultSettings.php (modified) (history)
  • /trunk/phase3/skins/vector/main-ltr.css (modified) (history)
  • /trunk/phase3/skins/vector/main-rtl.css (modified) (history)

Diff [purge]

Index: trunk/phase3/skins/vector/main-ltr.css
@@ -707,6 +707,9 @@
708708 font-family: Times, "Times New Roman", serif;
709709 font-style: italic;
710710 }*/
 711+pre, code, tt {
 712+ font-family: monospace, sans-serif;
 713+}
711714 code {
712715 background-color: #f9f9f9;
713716 }
@@ -715,7 +718,6 @@
716719 border: 1px dashed #2f6fab;
717720 color: black;
718721 background-color: #f9f9f9;
719 - font-size: 1.25em;
720722 line-height: 1.1em;
721723 }
722724 ul {
Index: trunk/phase3/skins/vector/main-rtl.css
@@ -707,6 +707,9 @@
708708 font-family: Times, "Times New Roman", serif;
709709 font-style: italic;
710710 }*/
 711+pre, code, tt {
 712+ font-family: monospace, sans-serif;
 713+}
711714 code {
712715 background-color: #f9f9f9;
713716 }
@@ -715,7 +718,6 @@
716719 border: 1px dashed #2f6fab;
717720 color: black;
718721 background-color: #f9f9f9;
719 - font-size: 1.25em;
720722 line-height: 1.1em;
721723 }
722724 ul {
Index: trunk/phase3/includes/DefaultSettings.php
@@ -1682,7 +1682,7 @@
16831683 * to ensure that client-side caches do not keep obsolete copies of global
16841684 * styles.
16851685 */
1686 -$wgStyleVersion = '273';
 1686+$wgStyleVersion = '274';
16871687
16881688
16891689 # Server-side caching:

Follow-up revisions

RevisionCommit summaryAuthorDate
r65959Merge Vector and UsabilityInitiative fixes from trunk: r64724, r65064, r65379...catrope19:03, 5 May 2010
r69335Improves on the technique used in r65391 to fix the font-size issues in Firef...tparscal17:50, 14 July 2010
r69336By flipping '"Courier New", monospace' to 'monospace, "Courier New"', we can ...tparscal18:31, 14 July 2010

Comments

#Comment by Tim Starling (talk | contribs)   05:40, 9 July 2010

After this change, my Firefox displays all <pre> elements with a proportional sans-serif font. I've confirmed with Firebug that removing the sans-serif fallback causes it to use monospace as expected.

#Comment by Trevor Parscal (WMF) (talk | contribs)   17:41, 14 July 2010

After investigating this a bit, it seems that while this was a clever work-around for a FireFox bug (https://bugzilla.mozilla.org/show_bug.cgi?id=175415), there are better more consistent ways to resolve this issue - see http://www.undermyhat.org/blog/2009/09/css-font-family-monospace-renders-inconsistently-in-firefox-and-chrome/

#Comment by Trevor Parscal (WMF) (talk | contribs)   17:52, 14 July 2010

See r69335 - also, I'm very curious how your browser fell back to sans-serif in the first place? What version of FF are you running? What sort of settings are you using? What OS was this on?

#Comment by Tim Starling (talk | contribs)   00:42, 15 July 2010

Firefox 3.6.6 from Ubuntu Lucid. It is indeed due to preferences. To reproduce it: Edit > Preferences > Fonts & Colors Advanced. Then change the selection for sans-serif to any specific font, I had it set to Liberation Sans. I tested this procedure starting from a default profile, in safe mode.

#Comment by Trevor Parscal (WMF) (talk | contribs)   17:54, 12 October 2010

This appears to be fixed, please re-review

#Comment by Catrope (talk | contribs)   17:53, 26 January 2011

Confirmed fixed: setting my sans-serif font to something crazy changes almost all the text on the page to that font, except pre elements.

Status & tagging log