Jeckky / dompdf

Automatically exported from code.google.com/p/dompdf
0 stars 0 forks source link

Inconsistent CSS counter behaviour compared to browsers #428

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
Have CSS Like the following:

h1   { counter-reset: headingB; }

h1:before { counter-increment: headingA; content: counter(headingA) ". "; }
h2:before { counter-increment: headingB; content: counter(headingA) "." 
counter(headingB) ". "; }

What is the expected output? What do you see instead?
Expected is that it starts with 1, it starts with 0.

What version of dompdf are you using? What version of PHP? On what operating 
system?
DomPDF: 0.6.0 beta 3
PHP: 5.3.X
OS: Ubuntu Linux

The fix:
Increment counters before parsing the :before pseudo-element content value. See 
attached patch, GIT style patch, use patch -p1

Original issue reported on code.google.com by xer...@theelitist.net on 16 Feb 2012 at 9:42

Attachments:

GoogleCodeExporter commented 9 years ago
Thank you, this makes the attached file to work. We'll fix it soon.

Original comment by fabien.menager on 16 Feb 2012 at 12:36

Attachments:

GoogleCodeExporter commented 9 years ago
This issue was closed by revision r476.

Original comment by fabien.menager on 16 Feb 2012 at 8:15

GoogleCodeExporter commented 9 years ago

Original comment by eclecticgeek on 30 May 2013 at 5:16