- From: aquino welkin <emp@vsen.com>
- Date: Fri, 7 Jan 2005 18:25:31 -0200
- To: <www-style@w3.org>
Actually the style is switched server-side, but the classes on elements of the html output are the same, I think you didn't got the point. -----Original Message----- From: W. Leon Sutton, Jr. [mailto:wsuttonjr@hyponiqs.com] Sent: sexta-feira, 7 de janeiro de 2005 17:51 To: aquino welkin Cc: www-style@w3.org Subject: RE: inner structures 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 -- No virus found in this incoming message. Checked by AVG Anti-Virus. Version: 7.0.300 / Virus Database: 265.6.9 - Release Date: 6/1/2005 -- No virus found in this outgoing message. Checked by AVG Anti-Virus. Version: 7.0.300 / Virus Database: 265.6.9 - Release Date: 6/1/2005
Received on Friday, 7 January 2005 20:26:50 UTC