Custom CSS per theme

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Greetings

  I have sent a feature request to teh devel group for the ability to
add a custom CSS per theme but while we wait to see if it can be done,
does anyone a quick way of loading a custom CSS per theme in SQM
1.4.x?

I have tried adding a dynamic system wide CSS by defining a
webmail.css.php with some PHP code to pull in the $color[] from the
themes but they are not loaded at that point so the variables are
blank.

This is the PHP code snippet that I tried in the "webmail.css.php"
(the rest is standard). It does what I expect it do except that the
$color[] variables are blank :
<?
echo ("INPUT,SELECT {\n");
echo ("        FONT-SIZE:                 12px;\n");
echo ("        FONT-WEIGHT:            bold;\n");
echo ("        CURSOR:                    hand;\n");
echo ("        COLOR:                       " . $color[5] . ";\n");
echo ("        BACKGROUND-COLOR:       " . $color[10] . ";\n");
echo ("        BORDER-TOP:             " . $color[4] . " solid 2;\n");
echo ("        BORDER-LEFT:            " . $color[4] . " solid 2;\n");
echo ("        BORDER-BOTTOM:      " . $color[0] . " solid 2;\n");
echo ("        BORDER-RIGHT:          " . $color[0] . " solid 2;\n");
echo ("}\n");
?>

  I tried adding the same code to the theme itself this added :
echo ("<STYLE TYPE=\"text/css\">\n");
... the rest as above ...
echo ("</STYLE>\n");

  But this fails because you can only define <STYLE> tags in the
header and the theme files seem to be loaded outside the <HEAD> tags.

  This now results in a catch twenty two, you can't load the theme
colours in the system wide CSS as the themes are not loaded yet and
you can't put it in the theme itself coz they loaded outside the
<head> tags.  The only solution I have is to add the dynamic <style>
to each php page in the SQM tree which is not only laborious and
painful but also hampers upgrades and adding of plugins.

  Does anyone have a method of implementing theme based CSS without
editing the source code?

Regards
Michael L Griffin

He who play in root,
                     eventually kill tree.

-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >>  http://get.splunk.com/
--
squirrelmail-users mailing list
Posting Guidelines: http://www.squirrelmail.org/wiki/MailingListPostingGuidelines
List Address: squirrelmail-users@xxxxxxxxxxxxxxxxxxxxx
List Archives: http://news.gmane.org/thread.php?group=gmane.mail.squirrelmail.user
List Archives:  http://sourceforge.net/mailarchive/forum.php?forum_id=2995
List Info: https://lists.sourceforge.net/lists/listinfo/squirrelmail-users

[Index of Archives]     [Video For Linux]     [Yosemite News]     [Yosemite Photos]     [gtk]     [KDE]     [Cyrus SASL]     [Gimp on Windows]     [Steve's Art]     [Webcams]

  Powered by Linux