Page 1 of 1

WebHelp: topic.css breaks zebra striping

Posted: Tue Apr 21, 2026 3:47 pm
by Frank Ralf
Hi,

We use CSS zebra striping with a custom WebHelp Publishing Template, initially created for Oxygen 26.1. With Oxygen 28.1 this does not work any longer. A look under the hood reveals that the following CSS from topic.css is the culprit:

Code: Select all

.simpletable>:not(caption)>*>*,
.table>:not(caption)>*>* {
    background-color: var(--wh-primary-bg,#fff);
    color: var(--wh-primary-color,#000)
}
I think this rule is a bit too broad and should be more precise in targeting the HTML elements to which it should be applied.

Best regards,
Frank

Re: WebHelp: topic.css breaks zebra striping

Posted: Tue Apr 21, 2026 6:13 pm
by julien_lacour
Hi Frank,

These new default rules are coming from newer Bootstrap versions, you can easily override it by targeting the cell instead of the row:

Code: Select all

tr:nth-child(even) > td {
  background-color: #f2f2f2;
}
Regards,
Julien

Re: WebHelp: topic.css breaks zebra striping

Posted: Tue Apr 21, 2026 7:50 pm
by Frank Ralf
Hi Julien,

Thanks for the background information and the pointer. I just reset the rule by putting the following code before my customization, because it also affected the styling of the table header:

Code: Select all

.simpletable>:not(caption)>*>*,
.table>:not(caption)>*>* {
    background-color: inherit;
    color: inherit;
}
Best regards,
Frank