Gossamer Forum
Home : Products : Gossamer Links : Discussions :

Re: [brewt] glinks template feedback

Quote Reply
Re: [brewt] glinks template feedback In reply to
I thought I'd just tell you how I'm doing my CSS styling since it overcomes some of the issues that you are discussing. However it does not use either core.css or custom.css since the procedure is a bit more complicated in order to cover the many differences in browsers that I think may arise with several other users.
I also think that a CSS specific forum (unrelated to a specific GT product) would be interesting instead of needing to refer people to other forums with CSS specific tips, hacks and rules etc.

In the include_common_head.html I have this code :

Code:
<link rel="stylesheet" href="<%config.db_static_url%>/<%t%>/filter.css" type="text/css" media="screen" />
<link rel="stylesheet" href="<%config.db_static_url%>/<%t%>/fontstyles.css" type="text/css" media="screen" />
<script type="text/javascript" src="<%config.db_static_url%>/<%t%>/vnjavascript.js"></script>

I could publish all the code but I think most of it is uninteresting and site specific so I'll give illustrating examples.

In filter.css I have this to direct different browsers to different overriding stylesheets in order to modify the CSS for browsers that do not comply to the W3C guidelines properly, inconsistently or for browser specific bugs :
There are references in my CSS to where I found the relevant information, in order to thank people that share when they do and recognition is due :)

Code:
/** To hide new code from older browsers **/
@import url("w3cbrowsers.css");

/**
* IE55/Win Styles from
* http://tantek.com/CSS/Examples/midpass.html
*/
@media tty {
i{content:"\";/*" "*/}}@m; @import 'ie55.css'; /*";}
}/* */


/**
* IE5/Win Styles from
* http://tantek.com/CSS/Examples/midpass.html
*/
@media tty {
i{content:"\";/*" "*/}}; @import 'ie5.css'; {;}/*";}
}/* */


/**
* IE5/Mac Styles from
* http://stopdesign.com/examples/ie5mac-bpf/ **/
/*\*//*/
@import "iemac.css";
/**/

In fontstyles I have font specific CSS code that is either understood by browsers or they are not capable of understanding CSS anyway. For example :

Code:
/** Text styles **/

.grey {
FONT-SIZE: 11px; COLOR: #333333; FONT-FAMILY: Arial, Helvetica, sans-serif
}

Then in the core CSS file (w3cbrowsers.css) I have this type of code, where 'template_name' is like luna :

Code:
/** Layout **/

BODY {
background: #fff url(../../images/template_name/page_bck.gif) top center repeat-y;
margin: 0px 0px 0px 0px;
padding: 0px 0px 0px 0px;
min-width: 750px;
TEXT-ALIGN: center;
}

Thus I have CSS files in
www/static/template_name

Images in
www/images/template_name

and my templates in

perl/admin/templates/template_name/local

This means I only have to modify the template_name in the w3cbrowsers.css and browser specific files if used.

This works pretty well for me because I have some complicated CSS styling that doesn't work in all browsers and I know Adrian has done a great job here with his CSS because I tested my beta version on IE5.1, IE5.2, IE5.5, IE6 FireFox and Opera 7. Although I haven't added alot of content I think it's pretty impressive.

Hope this helps some of you. I understand that it doesn't follow the initial beta concept but the two file system just won't work for me and I believe in sharing information when it can be relevant to certain users.
I'm not sure what Adrian thinks but I think that it could easily be modified to work with the core.css system in that you could have "w3cbrowsers.css" called "core.css". This way the core.css could be updated like expected and the template would call the filter.css in the template in order to allow for other browser specific CSS files.

John

PS for mozilla specific CSS code this usually works:
Code:
@im\port url("mozilla.css");
I just use FireFox as a basis so I haven't come across the need for hacks there yet...
Significant Media
Subject Author Views Date
Thread glinks template feedback Alba 10219 Mar 10, 2005, 1:18 AM
Thread Re: [Alba] glinks template feedback
brewt 9897 Mar 10, 2005, 1:29 AM
Post Re: [brewt] glinks template feedback
Alba 9837 Mar 10, 2005, 1:39 AM
Thread Re: [brewt] glinks template feedback
Alba 9913 Mar 15, 2005, 2:09 AM
Thread Re: [Alba] glinks template feedback
HyperTherm 9889 Mar 15, 2005, 2:19 AM
Thread Re: [HyperTherm] glinks template feedback
Alba 9803 Mar 15, 2005, 3:24 AM
Thread Re: [Alba] glinks template feedback
HyperTherm 9848 Mar 15, 2005, 6:38 PM
Thread Re: [HyperTherm] glinks template feedback
brewt 9960 Mar 15, 2005, 6:44 PM
Thread Re: [brewt] glinks template feedback
Alba 9805 Mar 16, 2005, 5:52 AM
Thread Re: [Alba] glinks template feedback
pugdog 9764 Mar 16, 2005, 10:29 AM
Post Re: [pugdog] glinks template feedback
Alba 9744 Mar 16, 2005, 11:06 AM
Thread Re: [Alba] glinks template feedback
brewt 9844 Mar 16, 2005, 11:54 AM
Post Re: [brewt] glinks template feedback
pugdog 9813 Mar 16, 2005, 12:24 PM
Post Re: [brewt] glinks template feedback
Alba 9727 Mar 16, 2005, 12:46 PM
Thread Re: [brewt] glinks template feedback
HyperTherm 9758 Mar 16, 2005, 1:15 PM
Thread Re: [HyperTherm] glinks template feedback
pugdog 9738 Mar 16, 2005, 1:23 PM
Thread Re: [pugdog] glinks template feedback
HyperTherm 9784 Mar 16, 2005, 1:36 PM
Thread Re: [HyperTherm] glinks template feedback
Alba 9737 Mar 16, 2005, 1:58 PM
Thread Re: [Alba] glinks template feedback
HyperTherm 9752 Mar 16, 2005, 2:06 PM
Thread Re: [HyperTherm] glinks template feedback
brewt 9736 Mar 16, 2005, 3:40 PM
Thread Re: [brewt] glinks template feedback
HyperTherm 9755 Mar 16, 2005, 4:22 PM
Post Re: [HyperTherm] glinks template feedback
brewt 4289 Mar 16, 2005, 4:29 PM
Post Re: [HyperTherm] glinks template feedback
mgeyman 4194 Mar 17, 2005, 4:20 AM
Post Re: [HyperTherm] glinks template feedback
Alba 4182 Mar 17, 2005, 8:55 AM
Thread Re: [Alba] glinks template feedback
brewt 9762 Mar 16, 2005, 3:29 PM
Thread Re: [brewt] glinks template feedback
Alba 4220 Mar 17, 2005, 1:34 AM
Thread Re: [Alba] glinks template feedback
brewt 4156 Mar 17, 2005, 2:02 AM
Thread Re: [brewt] glinks template feedback
Jag 4178 Mar 17, 2005, 4:35 AM
Thread Re: [Jag] glinks template feedback
Alba 4255 Mar 17, 2005, 9:03 AM
Post Re: [Alba] glinks template feedback
Jag 4138 Mar 18, 2005, 3:15 PM
Thread Re: [brewt] glinks template feedback
Alba 4177 Mar 19, 2005, 1:05 AM
Post Re: [Alba] glinks template feedback
brewt 4196 Mar 19, 2005, 1:33 AM
Thread Re: [HyperTherm] glinks template feedback
brewt 9781 Mar 16, 2005, 1:47 PM
Post Re: [brewt] glinks template feedback
HyperTherm 9746 Mar 16, 2005, 3:02 PM
Post Re: [Alba] glinks template feedback
brewt 9885 Mar 15, 2005, 10:26 AM