Re: Weird table alignment override in website docs style

From: Magnus Hagander <magnus(at)hagander(dot)net>
To: "Jonathan S(dot) Katz" <jkatz(at)postgresql(dot)org>
Cc: "David G(dot) Johnston" <david(dot)g(dot)johnston(at)gmail(dot)com>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, PostgreSQL WWW <pgsql-www(at)lists(dot)postgresql(dot)org>
Subject: Re: Weird table alignment override in website docs style
Date: 2020-04-15 07:45:20
Message-ID: CABUevEzwe+nthg1SE8pg1pnb4caBp+pv4=v=0Dw=NUGq_H06Kw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-www

On Wed, Apr 15, 2020 at 12:29 AM Jonathan S. Katz <jkatz(at)postgresql(dot)org>
wrote:

> On 4/14/20 6:17 PM, David G. Johnston wrote:
> > On Tue, Apr 14, 2020 at 2:53 PM Jonathan S. Katz <jkatz(at)postgresql(dot)org
> > <mailto:jkatz(at)postgresql(dot)org>> wrote:
> >
> > On 4/14/20 5:40 PM, Tom Lane wrote:
> > > "Jonathan S. Katz" <jkatz(at)postgresql(dot)org
> > <mailto:jkatz(at)postgresql(dot)org>> writes:
> > >> The fix is now live:
> > >> https://www.postgresql.org/docs/devel/functions-enum.html
> > >
> > > Hm, looking at
> > >
> > > https://www.postgresql.org/docs/devel/functions-enum.html
> > >
> > > it seems like it's now handling valign=middle for the "Function"
> > > header, but it's still ignoring align=center for all the headers.
> >
> > Oops I missed that, sorry.
> >
> > Doing some research, and from what I recall, align/valign as HTML
> > properties are technically no longer supported in HTML5 -- you are
> > supposed to handle this with CSS (text-align & vertical-align
> > respectively)[1]. The main reason it still works is that browsers
> still
> > support that backwards compatibility.
> >
> > I do have a fix on my local that accounts for this using CSS
> attribute
> > selectors to check for that value and then apply it as CSS and it is
> > safe across browsers. I do wonder if it's more prudent to have a
> class
> > on it that I can check for?
> >
> >
> > I would suggest adding a class to the table element designating this as
> > a "v12" style table.
>
> This would involve edits to the source documentation generation. Perhaps
> not unreasonable to do, and then we can namespace the changes (which we
> already do in the pgweb CSS).
>
> However, I would be a -1 for doing it by PostgreSQL version, but rather
> have it for "table version" as the table versions change less.
>
>
We could add a wrapper maybe? That is, we have a "<div id="docContent">".
We could add a version-dependent class to that one, e.g. class="docsv12"
and then style things below that.

But I'm not sure that's going to be scalable? You'll eventually end up with
rules that match docsv12, docsv13, docsv14, docsv15 etc. AFAIK you don't do
greaterthan/lessthan matching in css?

Bottom line is adding any info that we have at the db level to the wrapper
is easy.

--
Magnus Hagander
Me: https://www.hagander.net/ <http://www.hagander.net/>
Work: https://www.redpill-linpro.com/ <http://www.redpill-linpro.com/>

In response to

Browse pgsql-www by date

  From Date Subject
Next Message Marc Rechté 2020-04-15 11:12:53 Backend Flowchart / Developer doc
Previous Message David G. Johnston 2020-04-14 23:11:39 Re: Weird table alignment override in website docs style