Page 1 of 1

Can't style the number of an ordered list, it always remains bold

Posted: Thu May 24, 2018 11:41 pm
by mica-dptech
Hello!

I'm trying to make the numbers in an ordered list a normal font weight, not bold.

I have the following in my CSS:

Code: Select all

/* Make the ol numbers not bold */
*[class~="topic/ol"] > *[class~="topic/li"]:before {
font-weight: normal !important;
}
When I preview the merged.xml from the Chemistry output, the CSS has the proper effect, but when I view the PDF, the numbers are still bold.

Re: Can't style the number of an ordered list, it always remains bold

Posted: Tue May 29, 2018 11:28 am
by Dan
Indeed, there is a difference: For the screen is used the :before pseudo element while for the print the :marker pseudo element.
You should use:

Code: Select all


*[class~="topic/ol"] > *[class~="topic/li"]::marker {
font-weight:normal;
}

Re: Can't style the number of an ordered list, it always remains bold

Posted: Thu May 31, 2018 1:25 am
by mica-dptech
Ah, that works, thanks Dan!