Forum Bugs

first rule in a style sheet ignored

lcarey
Hi,

I seem to experience a bug where Prince ignores the first rule of a linked style sheet. (My apologies if this is a know bug, but I have looked through and searched the bugs forum and couldn't find anything about this.)

I'm using Prince 6.0 rev 7.

The issue is illustrated by the following page and style sheets:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> 
<head>
   <title>prince test</title>
   <link rel="stylesheet" href="princeTest.css" type="text/css" />
   <link rel="stylesheet" href="princeTest2.css" type="text/css" />
</head>
<body>
<div id="pageColumn">
<p class="firstP">text in 1st p</p>
<p class="secondP">text in 2nd p</p>
<p class="thirdP">text in 3rd p</p>
<p class="fourP">text in 4th p</p>
<p class="fiveP">text in 5th p</p>
<p class="sixP">text in 6th p</p>
</div>
</body>
</html>


princeTest:
p.firstP{color:Red;}
p.secondP, p.thirdP{color:Red;}


princeTest2
p.fourP, p.fiveP, p.sixP{color:Red;}


Using the above page and stylesheets, once I convert to pdf I find that the first and fourth p don't get the applied style.
mikeday
When I copy and paste this exactly as specified into three files it works fine, and all the paragraphs are red. Perhaps your CSS files being with a UTF-8 byte order mark (BOM) added by Notepad or a similar editor, that is confusing the Prince CSS parser. Could you try adding a comment at the beginning of your CSS file, eg. /* ignore this */ and see if it solves the problem?
lcarey
Hi,

I tried adding a comment on the first line of both style sheets and I still get the same effect.

I'm using visual web developer 2008 express edition to edit those files.
mikeday
Strange, can you email them to me (mikeday@yeslogic.com) so I can take a look?