We use a very similar approach - php to deliver the css.
This allows us to do some very cool things, such as target browsers with simple comments

For example:

/* IE
button {
    width: auto;
    overflow: visible;
}
button span {
    margin-top: 2px;
}
*/

or we can even target browser versions

/* IE6
button {
    width: auto;
    overflow: visible;
}
button span {
    margin-top: 2px;
}
*/

or even browsers and operating systems

/* Opera 9.10 Win
button {
    width: auto;
    overflow: visible;
}
button span {
    margin-top: 2px;
}
*/

We also store basic css configuration into a config.ini file that can be read by the php script, for example:

#---------------------------------#
# LAYOUT DEFINITION
#       style1 centered content, header and footer are fullscreen width
#       style2 fullscreen
#       style3 centered
#       style4 header fullscreen, everything else centered
#       style5 footer fullscreen, everything else centered
#---------------------------------#

layout.style            = style3;
layout.width            = 758;
left.width              = 185;
right.width             = 0;
header.display          = true;
footer.display          = true;
body.bg                 = #FFF;
header.bg               = #FFF;
left.bg                 = #dae2f0;
right.bg                = #78746E;
main.bg                 = #FFF;
footer.bg               = #FFF;

this sets up our basic layout for us, very quickly and easily. The true power is in using some logic to produce the cs is that is needed. We can then compress it all nicely, add a future expiry date, cache and we are good to go.

Sorry, this seemed to get completely off topic, but I am sure it will spark some conversations :)
Cheers
Adam



On Fri, 09 May 2008 14:46:34 +1000, David Hucklesby <[EMAIL PROTECTED]> wrote:

On Tue, 6 May 2008 19:19:24 +0530, Amrinder wrote:

I was reading this article on Smashing Magazine which shows how to increase code
readability,
http://www.smashingmagazine.com/2008/05/02/improving-code-readability-with-css-
styleguides/

but I have listened to Andy Clarke over Lynda.com saying that one should save the white
space as it increases the file size.



Ted Drake replied:

Reduce the number of css files used
Link to them in the top of the page, no inline styles
Gzip and reduce the whitespace when going to production.

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

A job for a server-side script. See:

 <http://www.coolphptools.com/dynamic_css>
Cordially,
David
--




*******************************************************************
List Guidelines: http://webstandardsgroup.org/mail/guidelines.cfm
Unsubscribe: http://webstandardsgroup.org/join/unsubscribe.cfm
Help: [EMAIL PROTECTED]
*******************************************************************




--
Using Opera's revolutionary e-mail client: http://www.opera.com/mail/


*******************************************************************
List Guidelines: http://webstandardsgroup.org/mail/guidelines.cfm
Unsubscribe: http://webstandardsgroup.org/join/unsubscribe.cfm
Help: [EMAIL PROTECTED]
*******************************************************************

Reply via email to