On Mon, 08 May 2006 20:58:37 GMT Beauregard T. Shagnasty <a.nony.mous@example.invalid> wrote:
|
phil-news-nospam@ipal.net wrote:
|
|> On Mon, 08 May 2006 20:41:24 +0100 David Dorward <dorward@yahoo.com> wrote:
|>| Beauregard T. Shagnasty wrote:
| [Evertjan wrote:]
|>|>> except serverside.
|>|
|>|> which would be writing a new/different CSS with each page-serve. <g>
|>|
|>| Only if you fail to send suitable cache control headers.
|
| Only if the same named external css file is rewritten.
If it is really a dynamically generated object at the server, such as
a CGI program/script, or PHP, then that would be the effect of being
rewritten.
|> I think he [the OP] means that the content would be different, and
|> that a new CSS file would have to be sent each time. If variable
|> substitution is done server-side, you'd have to disable caching, and
|> then you'd have a new CSS delivered each time, whether same or
|> different. The idea I think he is wanting to do is have some values
|> in the CSS file be variables that can be substituted at some point
|> (based one something doing that, I know not what) so that only one
|> CSS file serves all purposes.
|
| I think you're right, phil. The OP didn't indicate that he knows about
| (or thought about) writing CSS on-the-fly, so to speak.
|
| It is trivial to write code to add or change <style></style> blocks in
| the head of the pages.
Perhaps what he had in mind was a big CSS file that had several variable
references within, and an @import for another CSS file that would have
some kind of settings for those variables. The big file can be cached
because it is static and never changes, while the other file might be
small and perhaps dynamically generated. Or maybe he will set those
variables in the HTML, such as within <style></style> if CSS did have a
way to set and use variables. It's an interesting concept. I'm not
sure how generally (as in for everyone) useful it would be.
I've found that some of what would otherwise be complex things can in fact
be done fairly simple by just referencing multiple classes from HTML elements
and letting the effects of those classes mix appropriately. I don't know
what the OP ultimately wants to accomplish, so I don't know if this would be
at least some way around his issue, or not.
As far as I know, there is no need for the file extension to be ".css" for
a file to be used as style. It just needs the correct MIME type and be
referenced in the appropriate context. If the extension is ".php" then
he could generate it with PHP easily enough by having the server treat it
as such.
--
-----------------------------------------------------------------------------
| Phil Howard KA9WGN |
http://linuxhomepage.com/ http://ham.org/ |
| (first name) at ipal.net |
http://phil.ipal.org/ http://ka9wgn.ham.org/ |
-----------------------------------------------------------------------------