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

Request #2465 flexy: toStyle addition
Submitted: 2004-10-05 20:29 UTC
From: jesse dot planck at gmail dot com Assigned:
Status: Closed Package: HTML_Template_Flexy
PHP Version: 4.3.4 OS: all
Roadmaps: (Not assigned)    
Subscription  
Comments Add Comment Add patch


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 : 32 - 28 = ?

 
 [2004-10-05 20:29 UTC] jesse dot planck at gmail dot com
Description: ------------ Flexy:toJavascript is very helpful, yet I was wondering if we can have something to help deal with CSS Style Sheets. Many HTML workers use the @import to create web sites that degrade well with older browsers. It would be nice to be able to manipulate those. example of multiple styles for layout: <link rel="stylesheet" type="text/css" media="print" href="{ROOT_CSS}/print.css"> <link rel="stylesheet" type="text/css" media="screen" href="{ROOT_CSS}/compatible.css"> <style type="text/css" media="screen"> <!-- @import url({ROOT_CSS}/main.css); --> </style> There is probably a way, yet I am still digging for it!

Comments

 [2004-10-06 09:41 UTC] alan_k
I guess the trick here would be to apply the url rewriter to the body of the style eg. <link rel="stylesheet" type="text/css" media="print" href="images/print.css"> <link rel="stylesheet" type="text/css" media="screen" href="images/compatible.css"> <style type="text/css" media="screen"> <!-- @import url(images/main.css); --> </style> and it get replaced at compile time with the correct location (so composing the templates looks like the result) - is that what you where getting at?
 [2004-10-06 13:59 UTC] jesse dot planck at gmail dot com
Probably. I'm guessing that Flexy will not step into <style> because of the same problems caused by javascript and all those nasty "{}". It would be nice to do simple #var# replacements in <style>. I don't think I would add any other functionality, but I'm sure other people would have reasons... like allowing "IF" maybe. Being able to manipulate in-line styles can be cool for some folks I'm sure. My example is very simple, and I am simply trying to keep all template elements centralized and dependent on configuration settings in the PHP application. Jess.
 [2004-10-08 08:15 UTC] alan_k
This bug has been fixed in CVS. In case this was a documentation problem, the fix will show up at the end of next Sunday (CET) on pear.php.net. In case this was a pear.php.net website problem, the change will show up on the website in short time. Thank you for the report, and for helping us make PEAR better. variable replacements now work in comments in style blocks. (note: methods/if/end etc. dont though..)