On Sat, Jul 26, 2025 at 11:45:53PM +0200, Patrice Dumas wrote:
> On Sat, Jul 26, 2025 at 10:07:03PM +0100, Gavin Smith wrote:
> > A simple solution would be to avoid outputting the "printindex-index-entry"
> > class for index subentries and to put all the needed rules on both
> > classes.
>
> It looks good to me. It could also be possible to take that opportunity
> to add some subentry somewhere in the index-entry-level-1 if it is only
> for subentries, like
> index-subentry-level-1
I realised that any change to these CSS classes would likely have a knock-on
effect for the info.js JavaScript browsing enhancement (with the INFO_JS_DIR
variable for texi2any). It's probably manageable to update, though.
Should we add the name of the command, so current
<td class="printindex-index-entry index-entry-level-1">
would become the following?
<td class="printindex-index-subentry-level-1">
>
> > I read that you could have more "specificity" for a CSS rule by having
> > more classes, so an alternative is to output rules like this:
> >
> > td.index-entry-level-1 { padding-left: 3.5 em }
> > td.index-entry-level-1.printindex-index-entry { vertical-align: top;
> > padding-left: 2em }
> >
> > - however, we don't output any other multiple-class rules currently.
>
> Looks complicated to me, and the existing code may not be up to that
> construct.
I didn't fancy trying to work out how to store and output that rule with
the existing code...