tedd wrote:
> >http://www.sperling.com/examples/pcss/
Tedd, the particular PHP syntactical technique you've used in your
pcss article will trip over its own shoelaces as soon as the first
{background: url("xxx")} is encountered.
Instead of enclosing the whole stylesheet in double-quotes as you've done:
________________________
$color = "green";
$css = "
h2
{
color: $color;
}
";
echo($css);
________________________
...your approach would benefit from heredoc syntax:
________________________
$color = "green";
echo <<< CSS
h2
{
color: $color;
}
CSS;
________________________
Heredoc beautifully encompasses all text, including apostrophes &
quotation marks, until the end-pattern is encountered, interpreting
PHP $variables in the process.
http://php.net/heredoc#language.types.string.syntax.heredoc
Beyond that, I concur with others that it's possible, easy, and
advantageous to separate PHP from CSS in separate files, for many of
the same reasons we separate other types of script. A PHP program
can read a CSS file into a string variable, replace various key
values as desired, and deliver the result to the browser without
having to mix the two scripts in the same file.
Regards,
Paul
______________________________________________________________________
css-discuss [EMAIL PROTECTED]
http://www.css-discuss.org/mailman/listinfo/css-d
List wiki/FAQ -- http://css-discuss.incutio.com/
Supported by evolt.org -- http://www.evolt.org/help_support_evolt/