Previous Message
Next Message

Re: [css-d] css file extensions?

Sent by Chris Casciano on 31 January 2002 12:12

on 1/31/02 12:41 PM, my2cents at [EMAIL-REMOVED] wrote:

> I'm wondering about the file extension of the imported sheet. Is it
> necessary they be named foobar.css? Will foobar.html work? Will
> work (a custom extension)? (In my environment/cms/etc, it'd be much easier
> if i could name them .html instead of .css.)

Well, if I was a developer who you hired after renaming all your CSS files
to .html I'd (a) probably not think much of you and (b) probably quit out of
frustration is your environment was setup that 'dumb'. I guess that doesn't
answer any of your question though...

> I suppose there are two angles: Most Importantly: does the
> browser/html/code have a problem with it?  2nd: does the webserver have a
> problem with it? (A mime type issue, eh, which should just be a
> configuration issue)

Yes, it wouldn't be a problem at all as long as the style sheets are served
as text/css. That might be a pain to configure it you do choose .html as
your 'custom' extension because you have to devise a scheme to separate
files that should go out with the text/css MIME type and the text/html one.
That said, the underlying concept is fine. In fact, for a few projects I've
generated style sheets on the fly via PHP or perl - so the html might look
like this:

<link rel="StyleSheet" href="my_styles.php" type="text/css">

... But because the script sends the proper headers it all works out just

Chris Casciano                  home >>
                                words >
[EMAIL-REMOVED]       fun >>>
Previous Message
Next Message

Message thread: