Re: [pgsql-www] Example indenting - Mailing list pgsql-docs

From Bruce Momjian
Subject Re: [pgsql-www] Example indenting
Date
Msg-id 201008311745.o7VHjlf26025@momjian.us
Whole thread Raw
In response to Re: [pgsql-www] Example indenting  (Thom Brown <thom@linux.com>)
Responses Re: [pgsql-www] Example indenting  (Thom Brown <thom@linux.com>)
List pgsql-docs
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?

--
  Bruce Momjian  <bruce@momjian.us>        http://momjian.us
  EnterpriseDB                             http://enterprisedb.com

  + It's impossible for everything to be true. +

pgsql-docs by date:

Previous
From: Thom Brown
Date:
Subject: Re: [pgsql-www] Example indenting
Next
From: Thom Brown
Date:
Subject: Re: [pgsql-www] Example indenting