Closed Bug 245649 Opened 20 years ago Closed 20 years ago

bad interpretation of CSS rules applied to <pre> tags

Categories

(SeaMonkey :: General, defect)

x86
Linux
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED DUPLICATE of bug 159440

People

(Reporter: chris, Unassigned)

References

()

Details

User-Agent:       Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.6) Gecko/20040207 Firefox/0.8
Build Identifier: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.6) Gecko/20040207 Firefox/0.8

Suppose a web designer styles a pre tag thus:

<pre style="font-family: courier, monospace;">
1 2 3 4 5 6 7 8 9
| | | | | | | | |
</pre>

and the user has selected "Always use my fonts" in options. Firefox incorrectly
renders the <pre> in the default proportional font, not the default monospaced
font.


Reproducible: Always
Steps to Reproduce:
1. Switch on "Always use my fonts" (if you don't already have it on...

2. Go to http://www.python.org/doc/2.3.4/tut/node4.html
Actual Results:  
Text in code examples (wrapped in <pre>...</pre>) is rendered in a proportional
font.

Expected Results:  
Text in <pre> should be rendered in a monospaced font.

A font-family list with "monospace" in it should be treated differently from one
which doesn't when selecting which of the user's fonts to select. Probably to
cope with bad designers, names of common monospaced fonts (Courier, Lucida
Typewriter, ...) should be taken as indicating this too.

This bug is in Mozilla, too.
Assignee: firefox → general
Component: General → Browser-General
Product: Firefox → Browser
QA Contact: firefox.general → general
Version: unspecified → Trunk
As a further data point, I tried to work around this by putting the following in
userContent.css:
  pre { font-family: monospace ! important; }
This doesn't work either -- the style is ignored. Other stuff you put in there
(for instance changing the colour or font style) does work.
*** This bug has been marked as a duplicate of 159440 ***

*** This bug has been marked as a duplicate of 159440 ***
Status: UNCONFIRMED → RESOLVED
Closed: 20 years ago
Resolution: --- → DUPLICATE
hmm, this may really be a duplicate of bug 79074, not sure...
Product: Browser → Seamonkey
You need to log in before you can comment on or make changes to this bug.