| From: | Bruce Momjian <bruce(at)momjian(dot)us> |
|---|---|
| To: | Bruce Momjian <bruce(at)momjian(dot)us> |
| Cc: | Thom Brown <thom(at)linux(dot)com>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, jd(at)commandprompt(dot)com, Kevin Grittner <Kevin(dot)Grittner(at)wicourts(dot)gov>, Dave Page <dpage(at)pgadmin(dot)org>, pgsql-docs(at)postgresql(dot)org, Erik Rijkers <er(at)xs4all(dot)nl> |
| Subject: | Re: [pgsql-www] Example indenting |
| Date: | 2010-08-31 20:16:46 |
| Message-ID: | 201008312016.o7VKGkt01212@momjian.us |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-docs pgsql-www |
Bruce Momjian wrote:
> Thom Brown wrote:
> > On 31 August 2010 18:45, Bruce Momjian <bruce(at)momjian(dot)us> 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 <bruce(at)momjian(dot)us> http://momjian.us
EnterpriseDB http://enterprisedb.com
+ It's impossible for everything to be true. +
| Attachment | Content-Type | Size |
|---|---|---|
| /www/test/index.html | text/html | 653 bytes |
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Thom Brown | 2010-08-31 20:52:54 | Re: [pgsql-www] Example indenting |
| Previous Message | Bruce Momjian | 2010-08-31 17:59:47 | Re: [pgsql-www] Example indenting |
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Thom Brown | 2010-08-31 20:52:54 | Re: [pgsql-www] Example indenting |
| Previous Message | Bruce Momjian | 2010-08-31 17:59:47 | Re: [pgsql-www] Example indenting |