Re: [HACKERS] Small issue in online devel documentation build

From: Magnus Hagander <magnus(at)hagander(dot)net>
To: Bruce Momjian <bruce(at)momjian(dot)us>
Cc: Robert Haas <robertmhaas(at)gmail(dot)com>, Fabien COELHO <coelho(at)cri(dot)ensmp(dot)fr>, Peter Eisentraut <peter(dot)eisentraut(at)2ndquadrant(dot)com>, PostgreSQL Developers <pgsql-hackers(at)postgresql(dot)org>, PostgreSQL www <pgsql-www(at)postgresql(dot)org>
Subject: Re: [HACKERS] Small issue in online devel documentation build
Date: 2017-04-10 08:17:26
Message-ID: CABUevEwFxkdm0giEDOuJpKUxrR3=kVKLeYV1pJG+Fbc5Ek4dFg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers pgsql-www

On Mon, Apr 10, 2017 at 4:02 AM, Bruce Momjian <bruce(at)momjian(dot)us> wrote:

> On Sun, Apr 9, 2017 at 07:00:38PM +0200, Magnus Hagander wrote:
> >
> >
> > On Sun, Apr 9, 2017 at 2:32 AM, Bruce Momjian <bruce(at)momjian(dot)us> wrote:
> >
> > On Sat, Apr 8, 2017 at 12:50:19PM -0400, Robert Haas wrote:
> > > On Sat, Apr 8, 2017 at 6:39 AM, Bruce Momjian <bruce(at)momjian(dot)us>
> wrote:
> > > > What other problems do we have with pgweb that I can work on?
> > >
> > > Well, the 10devel documentation doesn't believe in orange.
> Compare:
> > >
> > > https://www.postgresql.org/docs/devel/static/sql-createtable.html
> > > https://www.postgresql.org/docs/9.6/static/sql-createtable.html
> > >
> > > I think that needs to be fixed.
> >
> > The attached CSS patch will fix that specific issue, but I am
> unclear if
> > there are more places that need color.
> >
> >
> >
> > Does this not also affect existing versions of the docs? AFAICT it would
> hit
> > any and all <h2> tags, and we certainly have those in earlier versions?
>
> It would hit any class of .refentrytitle inside of an <h2> block. I
>

Oh. That shows my love for css, i missed the fact that it will only hit
*subentries* with that class.
So it hits either "h1" *or* "h2" followed by something that's class
"refentrytitle".

Gotcha.

> didn't that that happened in the old docs, but I can use an href filter
> to do it only for docs of versions starting with '1' or saying 'devel'.
>

That said, doing something like this would probably be cleaner. However, I
think doing it based on href is a bad idea -- we're bound to silently break
that somehow.

What if we changed the <div id="docContent"> tag to be something like <div
id="docContent" class="post-10">

Please suggest a better name -- but the idea being we add a class do it,
conditionally for the docs of v10 and newer (which would include devel).
That way that logic stays where it belongs, and the CSS just uses the
information to style on.

Seems reasonable?

--
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

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Heikki Linnakangas 2017-04-10 08:27:33 Re: SCRAM authentication, take three
Previous Message Heikki Linnakangas 2017-04-10 08:11:51 Re: Implementation of SASLprep for SCRAM-SHA-256

Browse pgsql-www by date

  From Date Subject
Next Message Magnus Hagander 2017-04-10 12:07:15 Re: Update book to new version
Previous Message Bruce Momjian 2017-04-10 02:06:49 Re: [pgsql-www] Small issue in online devel documentation build