do i need to output headers on parsed CSS files?
| From: | Justin French | Date: | Thu, 24 Jul 2003 02:42:15 +0000 |
| Subject: | do i need to output headers on parsed CSS files? | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-156577@lists.php.net to get a copy of this message | ||
Hi all,
I'm forcing my style sheets (.css) though the PHP parser, so that they can take advantage of some color variables and global config settings via include files, eg:
body {
background-color: #<?=$col['1']?>;
}
however, I've noticed that when viewing the CSS file in a browser now, it looks more like a HTML document int he browser (variable width fonts, no newlines, etc) rather than other css files (wich look like they have <pre> tags aroun them (newlines visible, fixed-width font, etc).
So, my assumption is that pushing the .css file through PHP is putting the wrong header on the file (text/html) rather than text/css -- or perhaps something else -- my header knowledge is poor.
Anyway, the pages and linked CSS files *work* but do not validate any more, witha warning "You can't import an HTML document".
What/how should I force the correct headers on these PHP-parsed CSS files?
TIA
Justin French