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

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 » Thu May 24, 2018 11:41 pm

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: 430
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 » Tue May 29, 2018 11:28 am

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 » Thu May 31, 2018 1:25 am

Ah, that works, thanks Dan!

Post Reply