Re: Parsing .css files with php: Cons? [message #176749 is a reply to message #176748] |
Sat, 21 January 2012 21:37 |
Beauregard T. Shagnas
Messages: 154 Registered: September 2010
Karma:
|
Senior Member |
|
|
Michael Fesser wrote:
> The whole point of using PHP for creating the CSS is to avoid having to
> edit a dozen places in the CSS to change some color for example. Instead
> you make use of PHP and variables. Much simpler.
For one color, in a properly "optimized" CSS file, shouldn't there just
be one place there as well? That's the way mine are. I place all the
specific styling as one would normally expect: by elements, IDs and
classes, then end the file with all the color designators. Something like
this little sample:
body {
background: white; color: black;
}
id1, id2, class1, class2, class3, class4 {
color: blue;
}
p, li {
color: green;
}
Then of course just use an 'include' in the PHP code to the CSS file.
--
-bts
-This space for rent, but the price is high
|
|
|