Welcome Guest Search | Active Topics | Sign In | Register

Css nth-child selector handled wrong Options
Steve Smith
Posted: Friday, January 24, 2020 11:20:35 AM
Rank: Newbie
Groups: Member

Joined: 3/7/2013
Posts: 4
Have found a problem with the CSS nth-child selector behaviour in EO.Pdf (across multiple versions and also on current version)

When rendering the html below in Chrome, Firefox or Edge it renders every third line red on green background. However, EO.Pdf gets it wrong for the nth-child CSS selector showing changing the 2nd paragraph as green and then repeating every third line. The nth-of-type selector does work as expected.

Quote:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<style type="text/css">
p { background-color: aliceblue; }
p:nth-child(3n) { background-color: yellowgreen; }
p:nth-of-type(3n) {color: red; }
</style>
</head>
<body>
<p>1</p>
<p>2</p>
<p>3!</p>
<p>4</p>
<p>5</p>
<p>6!</p>
<p>7</p>
<p>8</p>
<p>9!</p>
</body>
</html>
eo_support
Posted: Friday, January 24, 2020 11:38:24 AM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,080
Hi,

Have you tested our newly posted 2020 build (do not use our demo page, that is not updated yet and is still on an older version)? We tested on build 2020.0.33 and it seems to produce the same result as in the browser.

Thanks!


You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.