"GOT", but the "O" is a cute, smiling sun Index | Thread

From:
Omar Polo <op@omarpolo.com>
Subject:
Re: gotwebd: class-ify some CSS selector and close a couple of divs
To:
Tracey Emery <tracey@traceyemery.net>
Cc:
gameoftrees@openbsd.org
Date:
Tue, 09 Aug 2022 18:03:18 +0200

Download raw body.

Tracey Emery <tracey@traceyemery.net> wrote:
> On Tue, Aug 09, 2022 at 05:30:27PM +0200, Omar Polo wrote:
> > Tracey Emery <tracey@traceyemery.net> wrote:
> > > On Sat, Aug 06, 2022 at 06:41:24PM +0200, Omar Polo wrote:
> > > > i noticed that gotwebd uses a lot of ids for element that are present
> > > > multiple times in a page.  Diff below moves all such ids to classes
> > > > (well, only the one that I've spotted so far.)  We could even consider
> > > > to move everything from ids to classes to simplify the work in the
> > > > future.
> > > > 
> > > > While here i've also deleted some unused css (or maybe i should keep
> > > > it for the future?) and fixed two HTML errors: one extra div closed in
> > > > one place and one missing div closed in another place.
> > > > 
> > > > I'm running my gotwebd with this applied and seems fine.
> > > > 
> > > 
> > > ok.
> > 
> > wooops, i've noticed only now that this broke the alternate coloring
> > of the files in the tree view.  The issue is that now we output
> > multiple class="" attributes and only the first one is used.
> > 
> > However, instead of fixing it by constructing the right class=""
> > attribute, what about doing something like this?
> 
> Sure, if that works across browsers, go for it. It's a cleaner solution.

Thanks, I've committed it.

MDN lists that support for :nth-child was added in firefox 3.5, while
chrome had it from day one.  It even works in netsurf, so i guess it's
fine :)

(for browsers without CSS support (w3m, links, eww, ...) it wasn't an
issue in the first place.)