History of PackageMSS

Version 3

PackageMSS

Package: My Site Stylist - the Wizard Of Style

Created by: xing, Last modification: 22 Jul 2004 (07:11 UTC) by xing
this is no actual feature yet, but a feature proposal



Preface

Themes are the reason for webmasters to try out a CMS. Only if its looks can easily be personalized it is considered a professional solution. Modern CMS sport features like "Themes", "Styles, or "Skins". Most of them, though, just have one actual theme, and some variations of colors and borders. The (now) classic source for what themes actually mean, is probably CSS Zen Garden. Every theme is different, still you could vary each one of them with another logo and some different colors to gain a nice sub-theme.

Our Plan

A wizard called my site stylist (not just CSS, but MSS) encourages an admin or user to adapt a given theme and apply basic style-changes. The result will not be a new theme, but a sub-theme. MSS aims at the user who doesn't know enough CSS and HTML to produce a full fledged theme by himself. The main target group is the admin of a Tikipro site. After the MSS wizard is done, the resulting style will give his site a "different from the rest" look.

Flow chart about the whole thing


A designer designed a theme called grind. An unknown admin likes it and decides to use it for his Tikipro site. Four files are involved:
  1. ))grind.css((
  2. ))grind_comments_en.css((
  3. ))grind_admin.css((
  4. ))grind_username.css((
The first 2 files were made by that designer, the 3rd file will contain the rules the admin wants to impose, the 4th file will contain rules that a user wants to impose, granted the admin lets him use the MSS feature (if that's not the case, the 4th file would not have to exist at all, in contrary to what had been stated above).

grind.css
{CODE(colors=>highlighting)}
body.grindy {background-color:#f0f0f0;background-image:url('/img/scanlines_top.gif')}
div.grindy {border:1px solid #f00;background-color:#fff}
h1 {color:#000;text-size:3em;font-family:serif;font-weight:700}
p {color:#a00;text-size:1em;font-family:sans-serif}
strong {color:#300;font-weight:500}
{CODE}

grind_comments_en.css
{CODE(colors=>highlighting)}
body.grindy {}

div.grindy {} /* This is the box that is used to display certain stuff
on every page. It contains the main content excluding
the controls (like tabs and buttons and such). These
comments should be as long as possible. */

h1 {} /* headings of main content, also used for blog titles
and as file gallery comments */

p {} /* every piece of text of the site
(even inside table cells!) */

strong {} /* text that should be bold, but is dark red and
not-bold in my theme "grind" */
{CODE}

We had somehow educated that designer that his theme would never be part of Tikipro, and thus he would remain un-honored for the rest of his life, if he didn't deliver a thought-through CSS and very interesting comments in a 2nd file. As soon as the unknown admin fires up his My Site Stylist (MSS), a script must open up grind.css and grind_comments_en.css (language depending on user settings) and collect the selectors, the styles, and the comments, so that the following huge form can happen to the user:
this table is currently under heavy development

{CODE(colors=>highlighting)}
<form>
<fieldset>
<legend>grind form</legend>
<table border="1">
<colgroup><col /><col /><col /></colgroup>
<thead>
<tr>
<th>selector</th>
<th>possible attributes and their values</th>
<th>comment/highlight</th>
</tr>
</thead>
<tfoot>
<tr>
<td colspan="3">table footer: some links here?</td>
</tr>
</tfoot>
<tbody>
<tr>
<td>body.grindy</td>
<td>
<input size="8" type="text" />&nbsp;text color (<em>onclick: chose one</em>)<br />
<input size="8" type="text" />&nbsp;background color (<em>onclick: chose one</em>)<br />
<input type="file" value="" />
&nbsp;
<select>
<option>repeat: only x</option>
<option>repeat: only y</option>
<option>repeat: x and y</option>
<option>no repeat</option>
</select>
&nbsp;
background image
<br />
top: <input type="text" size="4" value="..." /> right <input size="4" type="text" value="..." /> bottom <input size="4" type="text" value="..." /> left <input size="4" type="text" value="..." /> border color<br />
top: <input type="text" size="4" value="..." /> right <input size="4" type="text" value="..." /> bottom <input size="4" type="text" value="..." /> left <input size="4" type="text" value="..." /> border style <br />
top: <input type="text" size="4" value="..." /> right <input size="4" type="text" value="..." /> bottom <input size="4" type="text" value="..." /> left <input size="4" type="text" value="..." /> border width <br />
<input type="text" value="#000" />&nbsp;font color<br />
<input type="text" value="normal" />&nbsp;font style<br />
<input type="text" value="0.8em" />&nbsp;font size<br />
<input type="text" value="sans-serif" />&nbsp;font family<br />
<input type="text" value="1.8em" />&nbsp;line height<br />
</td>
<td>
<p>no comment available</p>
<p><em><a href="#" onmouseout="document.bgColor='#ffffff'" onmouseover="document.bgColor='#fdfd00'">mouse-over here and <strong>highlight body.grindy</strong> to see which element you are editing</a></em></p>
</td>
</tr>
<tr>
<td>&nbsp;</td>
<td>&nbsp;</td>
<td>
<p>&nbsp;</p>
</td>
</tr>
<tr>
<td>&nbsp;</td>
<td>&nbsp;</td>
<td>&nbsp;</td>
</tr>
<tr>
<td>&nbsp;</td>
<td>&nbsp;</td>
<td>&nbsp;</td>
</tr>
<tr>
<td>&nbsp;</td>
<td>&nbsp;</td>
<td>&nbsp;</td>
</tr>
</tbody>
</table>

<p>
Leave this field blank, or, If you know some CSS, add more style declarations:<br />
<textarea rows="4" cols="60" ></textarea>
</p>

<p><input type="submit" /></p>

</fieldset>
</form>
{CODE}

Now, ))grind_admin.css(( will be created. In header.tpl it will have to be included as the very last style sheet, so that its style overwrites grind.css (the !important trick will also serve that purpose).

grind_admin.css
{CODE(colors=>highlighting)}
body.grindy {}
div.grindy {border-width:1px 1px 10px 1px;border-style:solid solid dashed solid; !important}
h1 {color:#00ff00; !important}
p {font:0.8em/1.8em #000 normal sans-serif; !important}
strong {font-weight:700; !important}
{CODE}

That's it. Let's talk about
  • the actual attributes that can be set (not too many! no positioning whatsoever)
  • their values and how to pick them (dealing with colors and units? rather input than dropdown?)
  • that whole table should be ultra-usable, as to help somebody who's actually not aware of what he's doing
  • links gotta be in here, too. people always wanna change those
  • single table-rows could be single forms, so by constantly "applying one row" the user can play around with one element
  • actually there shouldn't be just one CSS file per theme, but one per feature (to avoid CSS overhead). Right?

Problems

  • logo images should not be part of CSS, still MSS wizard should take care of it (like that TikiWiki CI thingy)
  • upload of harmful pictures (or scripts?) via background-image:url()
  • file includes via @import (?)
  • !important rules overwrite short hand somewhat weirdly, like if you used short hand and specified a certain value, and then use !important and don't specify that value, !important might overwrite it with defaults
  • some (not many) browsers prefer author-!important over user-!important, meaning that our !important's might conflict with somebody's private CSS


Page History
Date/CommentUserIPVersion
13 Dec 2004 (05:06 UTC)
SEWilco207.195.192.910
Current • Source
laetzer217.231.148.589
View • Compare • Difference • Source
xing83.64.18.1227
View • Compare • Difference • Source
xing62.99.189.1306
View • Compare • Difference • Source
xing62.99.189.1305
View • Compare • Difference • Source
xing62.99.189.1304
View • Compare • Difference • Source
xing62.99.189.1303
View • Compare • Difference • Source
laetzer217.231.170.1542
View • Compare • Difference • Source