FUDforum
Fast Uncompromising Discussions. FUDforum will get your users talking.

Home » Imported messages » comp.lang.php » Parsing .css files with php: Cons?
Show: Today's Messages :: Polls :: Message Navigator
Return to the default flat view Create a new topic Submit Reply
Re: Parsing .css files with php: Cons? [message #176749 is a reply to message #176748] Sat, 21 January 2012 21:37 Go to previous messageGo to previous message
Beauregard T. Shagnas is currently offline  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
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: phpinfo is not showing in php4 version
Next Topic: arrays with holes
Goto Forum:
  

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ]

Current Time: Thu Nov 28 12:15:03 GMT 2024

Total time taken to generate the page: 0.04135 seconds