Page MenuHomePhabricator

Fix font declarations
Closed, ResolvedPublic

Description

GeSHi is inserting redundant <div style="font-family: monospace;"> and even less necessary <pre style="font-family: monospace;"> into the generated HTML. Redundant because the inline generated CSS already contains the necessary font declaration, and <pre> is already using a monospace font.

The way it is currently declared also has problems in several browsers that cause the text to be too small (see bug 20706, for which a general fix has been applied, but also needs to be applied here), and also interferes with sitewide CSS (ie. common.css).

What needs to be done:

  • Remove the inline, hardcoded font styling from the generated HTML (as it is already present in the generated CSS)
  • Change the default font declaration in the generated CSS to style="font-family: monospace, 'Courier New';" (see bug 20706 for explanation; the objective is not to prefer Courier New, but to trigger the correct behaviour of those borwsers)

Version: unspecified
Severity: normal

Details

Reference
bz27145

Event Timeline

bzimport raised the priority of this task from to Medium.Nov 21 2014, 11:12 PM
bzimport added a project: SyntaxHighlight.
bzimport set Reference to bz27145.
  • Bug 26204 has been marked as a duplicate of this bug. ***

happy.melon.wiki wrote:

We generally mark newer bugs as duplicates of older ones, not the other way around.

*** This bug has been marked as a duplicate of bug 26204 ***