Received: from maia.hub.org (maia-2.hub.org [200.46.204.251]) by mail.postgresql.org (Postfix) with ESMTP id ECCD963342B for ; Fri, 10 Sep 2010 18:22:08 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.251]) (amavisd-maia, port 10024) with ESMTP id 94468-08 for ; Fri, 10 Sep 2010 21:22:01 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from momjian.us (momjian.us [70.90.9.53]) by mail.postgresql.org (Postfix) with ESMTP id 88E7E632BCB for ; Fri, 10 Sep 2010 18:22:01 -0300 (ADT) Received: (from bruce@localhost) by momjian.us (8.11.6/8.11.6) id o8ALLxh20912; Fri, 10 Sep 2010 17:21:59 -0400 (EDT) From: Bruce Momjian Message-Id: <201009102121.o8ALLxh20912@momjian.us> Subject: Re: [DOCS] Doc fixes and improvements In-Reply-To: To: Thom Brown Date: Fri, 10 Sep 2010 17:21:59 -0400 (EDT) CC: Magnus Hagander , Tom Lane , PostgreSQL www X-Mailer: ELM [version 2.4ME+ PL124 (25)] MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="US-ASCII" X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-1.909 tagged_above=-5 required=5 tests=BAYES_00=-1.9, T_RP_MATCHES_RCVD=-0.01, WEIRD_PORT=0.001 X-Spam-Level: X-Archive-Number: 201009/46 X-Sequence-Number: 19133 Thom Brown wrote: > >> That javascript checked whether the values were the same, and if they > >> weren't, it introduced a stylesheet which made an adjustment, which is > >> pretty much what the current site does, except we don't bother > >> checking the rendering engine, just the default font settings. > >> > >> It seems that I'm a lot further off than I thought I was. :/ ?Back to > >> the drawing board. > > > > I think the original adjustment was flawed because it just set a > > percentage change. ?I think we can just assign them to match, rather > > than trying to figure out what percentage to use. ?Where is the > > javascript file? > > It wasn't introduced for the existing site, but you can grab it from here: > > http://pgweb.darkixion.com:8081/media/js/monospacefix.js > http://pgweb.darkixion.com:8081/media/css/monospacefixes.css OK, that helps, and I see the issue now. You basically have no way to push the calculation up into the style sheet. There are several options: 1. Use document.styleSheet[] to push changes into the style sheet 2. Use javascript to set a computed "style" string for every item with a specific class. 3. Use a single monospacefixes.css file 4. Use one of several monospacefixes.css files based on a computed value #1 and #2 are overkill, I think. #3 is what we have now, and is obviously deficient. #4 seems good to me; using http://pgweb.darkixion.com:8081/media/js/monospacefix.js I would add: if (propSize / monoSize >= 1.8) document.write('\n'); else if (propSize / monoSize >= 1.4) document.write('\n'); else if (propSize / monoSize >= 1.2) document.write('\n'); else if (propSize / monoSize >= 1.1) document.write('\n'); That requires the creation of four small style sheets, and should cover most of the common ratios. -- Bruce Momjian http://momjian.us EnterpriseDB http://enterprisedb.com + It's impossible for everything to be true. +