Last modified: 2012-09-27 01:10:46 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T25951, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 23951 - Monospace font settings messed up in certain browsers
Monospace font settings messed up in certain browsers
Status: RESOLVED INVALID
Product: MediaWiki
Classification: Unclassified
Interface (Other open bugs)
unspecified
All All
: Normal normal (vote)
: ---
Assigned To: Trevor Parscal
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2010-06-14 00:26 UTC by entlinkt
Modified: 2012-09-27 01:10 UTC (History)
1 user (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments

Description entlinkt 2010-06-14 00:26:27 UTC
"pre, code, tt { font-family: monospace, sans-serif; }" has been added as a workaround for bug 20706.

This workaround is problematic because it exploits a Mozilla bug (https://bugzilla.mozilla.org/show_bug.cgi?id=175415). It causes the following new problems:

(1) Mozilla users can no longer adjust the size of monospaced fonts independently of sans-serif fonts because Mozilla will use the configured size of sans-serif fonts even for monospaced fonts. This "fixes" bug 20706 just because Mozilla's default size for sans-serif fonts is 16px while the default size of monospaced fonts is 13px.
(2) It doesn't always work because some other css rules (extensions, local customizations, inline style attributes of templates etc.) may override it with "font-family: monospace", effectively removing the "sans-serif" that triggers the Mozilla behaviour. <pre> elements inserted by the SyntaxHighlight GeSHi extension are an example of this (bug 23708). In order to have it at least consistent, the workaround would have to be added *everywhere*.
(3) It will stop working when the Mozilla bug is fixed.

Google Chrome seems to behave exactly like Mozilla in this regard btw. (same default sizes, same bug as Mozilla).
Comment 1 entlinkt 2010-06-14 01:54:51 UTC
After some more research, this workaround turns out to be widely used on the web to circumvent bad defaults and unpredictable/inconsistent rendering across browsers (see http://www.brunildo.org/test/monospace_fsize.html and the links there), so the option to configure monospaced fonts differently that some browsers offer isn't very useful anyway. Therefore closing as invalid because removing it would probably cause more problems than doing good.

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links