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

Having trouble installing Oxygen PDF Chemistry? Got a bug to report? Post it all here.
mica-dptech
Posts: 2
Joined: Thu May 24, 2018 11:36 pm

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

Post 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.
Dan
Posts: 501
Joined: Mon Feb 03, 2003 10:56 am

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

Post 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;
}
mica-dptech
Posts: 2
Joined: Thu May 24, 2018 11:36 pm

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

Post by mica-dptech »

Ah, that works, thanks Dan!
Post Reply