Re: Large fixed-width text

From: Dave Page <dpage(at)pgadmin(dot)org>
To: Petr Jelinek <pjmodos(at)pjmodos(dot)net>
Cc: Bruce Momjian <bruce(at)momjian(dot)us>, PostgreSQL www <pgsql-www(at)postgresql(dot)org>
Subject: Re: Large fixed-width text
Date: 2009-09-27 16:36:11
Message-ID: 937d27e10909270936l3c2f874frd39fb6311b1f7014@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-www

2009/9/27 Petr Jelinek <pjmodos(at)pjmodos(dot)net>:

> It's known behavior, not a bug.
> By default FF on Windows (not sure about other OSes, but on Jaunty my FF
> does it too), Safari, Chrome all choose 13px font size for monospace and
> 16px for everything else (so maybe you changed default font size for
> monospaced fonts in your FF?). And since we have 76% (docs) and 69% (primary
> web) body font sizes, they get inherited and monospace text is too small
> (76% of those default 13px) and obvious fix is to make it larger and that's
> what we do. There are other ways to fix this. One is specifying exact font
> family and not monospace generic font family, but that changes font for
> people who have different default monospace font from what we choose and
> also since we are not using the monospace generic font family (see why
> below), people who don't have any of the fonts we specify the won't have
> monospaced text at all in those elements.
> There is also Firefox specific "fix" for this (very ugly):
>
> font-family : monospace, "";
>
> And remove all those font-size hacks. One more way to fix it in Firefox
> (3.0+) is to use font-size-adjust : 0.58 for pre, tt, code. Other browsers
> don't support this propery.
> So the real problem is Safari (Webkit). It switches to smaller font size
> once you specify monospace generic font family anywhere in the font-family
> property and it does not support font-size-adjust.
> Opera does it differently, it just uses internal default stylesheet to make
> font-size smaller (0.81em IIRC) for those elements that are monospaced by
> default (pre, tt, ...) so setting font-size : 1em is enough there. IE seems
> to do something similar since it behaves the same, so no problem in either
> of those two.
>
> As you can see every browser does something different and finding universal
> solution is not easy.

It almost sounds like you're volunteering to be our new in-house CSS
expert Petr :-)

> Anyway those #txtArchives pre and #txtArchives tt do not affect
> documentation but they indeed seem to be plain wrong, they are actually only
> used by Opera (and maybe Chrome , I don't have that browser) and the text
> looks huge there. In FF and Safari they are overwritten by
>
> #pgContainer code, #pgContainer pre, #pgContainer tt {
> font-size: 1.2em;
> }
>
> in geckofixes.css (yes it loads for Safari too on my machine and it's a good
> thing) and in IE they're overwritten by
>
> * html #txtArchives pre { font-size: 100%; }
>
> in iefixes.css.

txtArchives is used by archives.postgresql.org, not the docs.

--
Dave Page
EnterpriseDB UK: http://www.enterprisedb.com

In response to

Responses

Browse pgsql-www by date

  From Date Subject
Next Message Petr Jelinek 2009-09-27 17:00:35 Re: Large fixed-width text
Previous Message Robert Haas 2009-09-27 13:35:43 Re: email obscuring