- From: W. Leon Sutton, Jr. <wsuttonjr@hyponiqs.com>
- Date: Fri, 7 Jan 2005 14:50:53 -0500 (EST)
- To: "aquino welkin" <emp@vsen.com>
- Cc: www-style@w3.org
Aquino Welkin's words: > I know there's no brilliant point on this but still saves time and avoid > overwriting existing classes, basically by protecting one class inside > another, I use to have very simple names on my css because my current > application has 10+ themes and inside themes a style layer which makes > possible one theme extend into another dozen styles. I would definitely suggest the use of a server-side style switcher. It's actually quite easy to write one yourself. In point of fact, when it's finished, my site will incorporate its own style-switcher. It will maintain the chosen style throughout the user's session to my site. Basically speaking, it will set a default style. When a user changes the style, a session is opened and the style chosen will remain throughout the user's session - which typically ends upon closing the browser. Each style's stylesheets and imagery are held within a sub-folder of my CSS and images folders. When the style is changed, it simply changes the values of the <link /> tags as well as the location of all the imagery for that style. A sample of this may be: // Forgive me for posting this in the message; // I know this isn't a development mailing list. $stylesheets = array("headstyle.css", "bodystyle.css", "footstyle.css"); $ui_style = "Style1"; if (isset($_SESSION['UIStyle'])) { $ui_style = $_SESSION["UIStyle"]; } for ($i = 0; $i < count($stylesheets); $i++) { echo "<link rel=\"stylesheet\" href=\"/style/". $ui_style ."/". $stylesheets[$i] ."\" />\n"; } If you want to learn more about this and how it can help you with your troubles, send me a personal email and I'll give you more implicit instuctions as well as CSS and/or PHP tips if you need them. Also, AListApart.com also provides a server-side and client-side style switcher. Whatever you decide to do, I do maintain that breaking up your stylesheets for each style is a must. You don't want to contain all your styles for 10 different styles in one stylesheet. W3 isn't going to write an addition to their recommendations for poor document formats and techniques. Thanks, W. Leon Sutton, Jr. Hyponiq's Web Development Solutions - www.hyponiqs.com
Received on Friday, 7 January 2005 19:50:55 UTC