Package home | Report new bug | New search | Development Roadmap Status: Open | Feedback | All | Closed Since Version 1.5.4

Request #12194 wrong handling of At-Rules
Submitted: 2007-10-07 22:41 UTC
From: cwiedmann Assigned: farell
Status: Closed Package: HTML_CSS (version 1.2.0)
PHP Version: 5.2.2 OS: Windows_NT
Roadmaps: 1.5.0    
Subscription  


Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know! Just going to say 'Me too!'? Don't clutter the database with that please !
Your email address:
MUST BE VALID
Solve the problem : 4 + 10 = ?

 
 [2007-10-07 22:41 UTC] cwiedmann (Carsten Wiedmann)
Description: ------------ Hello, some At-Rules must be in correct place and order. The attached path correct some problems. But e.g. @media is not fully supportet. For example: | @media print { | blockquote { font-size: 16pt } | } still don't work correct. Regards, Carsten BTW: Your class files have DOS and not UNIX lineends. Is this correct? Test script: --------------- <?php header('Content-Type: text/plain'); require_once 'HTML/CSS.php'; $cssDef = <<<EOD @import url("foo.css") screen, print; @media screen { color: green; background-color: yellow; } @namespace foo url("http://www.example.com/"); html { height: 100%; } @charset "UTF-8"; @page thin:first { size: 3in 8in } @fontdef url("http://www.example.com/sample.pfr"); @font-face { font-family: dreamy; font-weight: bold; } EOD; $css = new HTML_CSS(); $css->parseString($cssDef); echo $css->toString(); ?> Expected result: ---------------- @charset "UTF-8"; @import url("foo.css") screen, print; @namespace foo url("http://www.example.com/"); @fontdef url("http://www.example.com/sample.pfr"); @media screen { color: green; background-color: yellow; } html { height: 100%; } @page thin:first { size: 3in 8in; } @font-face { font-family: dreamy; font-weight: bold; } Actual result: -------------- @import url("foo.css") screen, print; @media screen { color: green; background-color: yellow; } @namespace foo url("http://www.example.com/"); html { height: 100%; } @charset "utf-8"; @page thin:first { size: 3in 8in; } @fontdef url("http://www.example.com/sample.pfr"); @font-face { font-family: dreamy; font-weight: bold; }

Comments

 [2007-12-10 09:22 UTC] farell (Laurent Laville)
Carsten, I've not enough time to implement and test support of At-rules, you've proposed to me, but. I'll do for next version 1.5.0 : I've also change type from bug to request, because at-rules was never been supported since the beginning, so I consider it is not a bug. Regards Laurent
 [2008-01-10 20:17 UTC] farell (Laurent Laville)
Hello Carsten, I've finally finished to implement new API 1.5.0 that support at-rules. One restiction (that's very few) @fontdef that is only for NetScape 4 is not supported/implemented. And your problem with @media print { blockquote { font-size: 16pt } } is solved now. Please, take a look on PEAR CVS to get the latest version (examples are provides too). A feedback with your own tests will be welcome before public release still planned for January 15th. Regards Laurent
 [2008-01-13 17:11 UTC] farell (Laurent Laville)
This bug has been fixed in CVS. If this was a documentation problem, the fix will appear on pear.php.net by the end of next Sunday (CET). If this was a problem with the pear.php.net website, the change should be live shortly. Otherwise, the fix will appear in the package's next release. Thank you for the report and for helping us make PEAR better. Carsten, Developement is over ( All unit tests were passed ) At-rules is fully supported and without regressions Public release will be in two days ! I've received no feedback from you Carsten but I hope you're agree with me : API 1.5.0 with At-Rules is Ready ! Laurent