Received: from maia.hub.org (maia-5.hub.org [200.46.204.29]) by mail.postgresql.org (Postfix) with ESMTP id 3FC79632CA2 for ; Tue, 31 Aug 2010 17:17:04 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.29]) (amavisd-maia, port 10024) with ESMTP id 30527-10 for ; Tue, 31 Aug 2010 20:16:56 +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 45BB1632AF0 for ; Tue, 31 Aug 2010 17:16:56 -0300 (ADT) Received: (from bruce@localhost) by momjian.us (8.11.6/8.11.6) id o7VKGkt01212; Tue, 31 Aug 2010 16:16:46 -0400 (EDT) From: Bruce Momjian Message-Id: <201008312016.o7VKGkt01212@momjian.us> Subject: Re: [pgsql-www] Example indenting In-Reply-To: <201008311759.o7VHxl829004@momjian.us> To: Bruce Momjian Date: Tue, 31 Aug 2010 16:16:46 -0400 (EDT) CC: Thom Brown , Tom Lane , jd@commandprompt.com, Kevin Grittner , Dave Page , pgsql-docs@postgresql.org, Erik Rijkers X-Mailer: ELM [version 2.4ME+ PL124 (25)] MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="ELM1283285806-20867-0_" Content-Transfer-Encoding: 7bit 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, HTML_MESSAGE=0.001, T_RP_MATCHES_RCVD=-0.01 X-Spam-Level: X-Archive-Number: 201008/163 X-Sequence-Number: 5987 --ELM1283285806-20867-0_ Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="US-ASCII" Bruce Momjian wrote: > Thom Brown wrote: > > On 31 August 2010 18:45, Bruce Momjian wrote: > > > Thom Brown wrote: > > >> >> But the benefit of the javascript hack was that we weren't setting a > > >> >> base font size for everything, we just bump up the relative font size > > >> >> for elements which are monospaced by default. > > >> >> > > >> >> There's pros and cons to both approaches. ?I'm not sure which one you > > >> >> guys prefer. > > >> > > > >> > If we are using Javascript, why can't we probe the font size and do > > >> > something reasonable, e.g. make monospace larger only if it smaller than > > >> > proportional? > > >> > > >> Hmm.. I don't know if the rendered font size is exposed to the DOM. > > > > > > I quick search shows it as document.body.style.fontSize: > > > > > > ? ? ? ?http://www.ehow.com/how_5924039_change-font-size-javascript.html > > > > > > I believe you can query a fixed-width attribute to find its font size. > > > Would you like me to write some Javascript that illustrates that? > > > > The code on that page shows that the value can be blank, suggesting it > > only picks up applied CSS styles, not font sizes which are a result of > > falling back on the defaults. > > OK, let me dig around. I found some sample code the is supposed to work in all browers. I tested it in Firefox and it worked. It should work in Opera and IE as well. HTML/Javascript file attached. -- Bruce Momjian http://momjian.us EnterpriseDB http://enterprisedb.com + It's impossible for everything to be true. + --ELM1283285806-20867-0_ Content-Transfer-Encoding: 7bit Content-Type: text/html Content-Disposition: inline; filename="/www/test/index.html" test

hi

hi2

--ELM1283285806-20867-0_--