From 66e1bc76e1b5f2ed94eed6930dc2878ac41d8aad Mon Sep 17 00:00:00 2001 From: Trevor Parscal Date: Wed, 14 Jul 2010 17:50:51 +0000 Subject: [PATCH] Improves on the technique used in r65391 to fix the font-size issues in Firefox, Chrome and Safari caused by using "monospace" as a font-family. The old approach was to use "monospace, sans-serif", which worked but was reported to actually fall-back on the sans-serif variant. Some research has shown that using '"Courier New", monospace' resolves the issue on all browsers without risking falling back to proportionally spaced fonts. --- includes/DefaultSettings.php | 2 +- skins/vector/main-ltr.css | 6 +++++- skins/vector/main-rtl.css | 6 +++++- 3 files changed, 11 insertions(+), 3 deletions(-) diff --git a/includes/DefaultSettings.php b/includes/DefaultSettings.php index c66fa49b0b..c7af4b9883 100644 --- a/includes/DefaultSettings.php +++ b/includes/DefaultSettings.php @@ -1547,7 +1547,7 @@ $wgCacheEpoch = '20030516000000'; * to ensure that client-side caches do not keep obsolete copies of global * styles. */ -$wgStyleVersion = '295'; +$wgStyleVersion = '296'; /** * This will cache static pages for non-logged-in users to reduce diff --git a/skins/vector/main-ltr.css b/skins/vector/main-ltr.css index fdb899e1c6..80876b6eb8 100644 --- a/skins/vector/main-ltr.css +++ b/skins/vector/main-ltr.css @@ -721,7 +721,11 @@ blockquote { font-style: italic; }*/ pre, code, tt { - font-family: monospace, sans-serif; + /* + * It's important for this rule to first reference an actual font name, some browsers will render the monospace text + * too small otherwise, namely Firefox, Chrome and Safari + */ + font-family: "Courier New", monospace; } code { background-color: #f9f9f9; diff --git a/skins/vector/main-rtl.css b/skins/vector/main-rtl.css index 3f4904b3a2..7b63d4793f 100644 --- a/skins/vector/main-rtl.css +++ b/skins/vector/main-rtl.css @@ -721,7 +721,11 @@ blockquote { font-style: italic; }*/ pre, code, tt { - font-family: monospace, sans-serif; + /* + * It's important for this rule to first reference an actual font name, some browsers will render the monospace text + * too small otherwise, namely Firefox, Chrome and Safari + */ + font-family: "Courier New", monospace; } code { background-color: #f9f9f9; -- 2.20.1