Hello Brian,
On Wed, 24 May 2006, Brian Candler wrote:
On Wed, May 24, 2006 at 04:29:51PM +0200, Pawel Tecza wrote:
It's a very good idea. I like it :) I also propose to add a new
environment variable (for example SQWEBMAIL_CSSFILE), for dynamic
setting of CSS file.
I think better would be to insert a cascaded stylesheet: e.g.
<link rel="stylesheet" type="text/css" href="[#SQWEBMAILCSS#]" />
<link rel="stylesheet" type="text/css" href="[#SQWEBMAILCSSUSER#]" />
It sounds very interesting. If I have only a few changes in sqwebmail.css
file, then I can add my own CSS file with them. But if there are a lot of
changes, then I can remove default Sqwebmail CSS file at all and use only
my own cascaded stylesheet. It's really a better idea.
Sam, what is your opinion about Brian's idea? Do you like it?
(where SQWEBMAILCSSUSER could be set from an environment variable, with a
sensible default)
But how to implement it? Do you want to include into Sqwebmail an empty
sqwebmailuser.css file and add an appropriate <link> tag to all HTML
templates?
In my opinion it can be a good complement for
the SQWEBMAIL_TEMPLATEDIR variable. Now if I want to have the same
templates, but with the different styles (for example with default,
bigger and the biggest fonts), I have to multiply templates.
I worked around this using mod_rewrite in Apache; you can rewrite
/images/sqwebmail.css to fetch an arbitary file based on a database lookup.
But your environment feature makes this easier to implement in simple
virtual hosting setups.
I have name-based templates, so your tip probably won't work for me.
I agree with you, in that installing a different set of HTML templates
without corners avoids this problem. However, every time you upgrade to a
new version of sqwebmail, you'd have to make the corresponding set of
changes to the new version's templates.
Yes, it's a pain, but a bigger problem for me is that a look of Sqwebmail
often is hardcoded (for example <hr> tags, attributes of <table>, <tr>
and <td> tags, font size, etc.) and I have to hack Sqwebmail to change it.
BTW, do you think about using <div> tags instead of <table> tags, Sam?
My best regards,