Revision [2157]

This is an old revision of WikkaCSS made by NilsLindenberg on 2004-11-11 16:44:06.

 

Wikka CSS Issues


Issues and discussion related to Wikka CSS stylesheets

Related pages:

Also relevant:
 



A Better Horizontal Menu

I find that the current Wikka horizontal menu allows very limited layout control.
A well formed CSS menu should IMO:

  1. be put in a dedicated <DIV id="menu"> so that it can be moved around the page and its layout freely modified. See as an example this wikka site: http://www.awug.net/HomePage
  1. be coded as an unordered list. See this tutorial

Your ideas?

-- DarTar

Just give the unordered list itself an id (which indicates which menu it is!), and it can be "moved around the page" as desired. No need to wrap it in a div just to do that (though a div may be useful for other purposes). I agree though that all menus should be marked up as unordered lists and styled with CSS.
-- JavaWoman



Strikethrough rendering

Strikethrough seems to highlight the selected text like this instead of striking through it. Looks like Wikka uses the deletions class from wikka.css instead of the strikethrough class.
.strikethrough {color: #888; text-decoration: line-through;}
.deletions {color: #876; background-color: #FFCC99;}

--RichardTerry

(see new code below)
--NilsLindenberg (no own computer, no installed wikka :(

Marking "a strikethrough" as "deletion" in order to get a certain rendering is just a roundabout way to go back to presentational markup instead of structural, semantic markup! The class should indicate its purpose (i.e., real clasification!); so if the purpose is "strikethrough" rather than "deletion", it should indeed be a separate class. In the CSS you then have the freedom to either style both classes the same, or to style them differently.
See also my remarks about "markup of diff pages" in the SuggestionBox!
-- JavaWoman


Yes, I have read your remarks in the SB. But this is (hopefully, as i can't test it) an easy solution for the problem, as long as it isn't modified towards your suggestions.

The problem is, that there is no handling for "deletion". Instead, "strikethrough" is missused for it. To change this:

change in formaters/wakka.php

static $trigger_inserted = 0;
static $trigger_center = 0;

to
static $trigger_inserted = 0;
static $trigger_deleted = 0;
static $trigger_center = 0;

and

$trigger_bold = $trigger_center = $trigger_floatl = $trigger_inserted = $trigger_italic =$trigger_keys = 0;

to
$trigger_bold = $trigger_center = $trigger_floatl = $trigger_inserted = $trigger_deleted = $trigger_italic =$trigger_keys = 0;

and

// strikethrough
else if ($thing == "++" || $thing == "&yen;&yen;") 
{
 return (++$trigger_strike % 2 ? "<span class=\"deletions\">" : "</span>");
} 

to
// strikethrough
else if ($thing == "++") 
{
return (++$trigger_strike % 2 ? "<span class=\"strikethrough\">" : "</span>");
} 

and add (after //inserted))

// deletions
else if ($thing == ""&yen;&yen;") 
{
return (++$trigger_deleted % 2 ? "<span class=\"deletions\">" : "</span>");
} 



Missing Pages
Is there a reason why missing pages are marked through <a href="..."><span class="missingpage">Page name</span></a> instead of <a class="missingpage">Page name</a>? This makes control on hover behavior difficult.
-- DarTar



Better code rendering
I found that bits of code sometimes are rendered hard to understand, with both loss of original indents and line wrapping. The cause is 1) inheritance of the body's "justify" text alignment, and 2) the fact that lines are allowed to wrap (overflow: auto; doesn't prevent this).

My suggested solution is the following change for the code class in wikka.css:
.code {
	color: black;
	background: #ffffee;
	border: 1px solid #888;
	font: 11px "Bitstream Vera Sans Mono","Courier New", monospace;
	width: 95%;
	margin:auto;
	padding: 3px;
	text-align: left;     /* override justify on body */
	overflow: auto;       /* allow scroll bar in case of long lines - goes together with white-space: nowrap! */
	white-space: nowrap;  /* prevent line wrapping */
}

(BTW, a formatter for css would be nice ;-)) - See GeSHi! which several other Wikis are already using...)
-- JavaWoman



Alternate stylesheets

I really appreciate alternate stylesheets (classical one, more elaborated, aso). To allow them to be configured in WikkaWiki, you could just add :

* In wikka.config.php this line (for exampe just after "stylesheet" => "wikka.css", ) :

  "alternates_stylesheets" => array("wikka1.css" => 'Wikka 1', 
									"wikka2.css" => 'Wikka 2', 
									"wikka3.css" => 'Wikka 3'),


* in header.php this two lines just after the last link and before the "style" box :

<?php
  // Alternate links
  foreach ($this->GetConfigValue("alternates_stylesheets") as $alternate_css => $alternate_name)
  {
	echo '<link rel="alternate stylesheet" type="text/css" href="' . $css_path . $alternate_css . '" media="screen" title="' . $alternate_name . '" />';
  }
?>


(I've too added a $css_path variable,
$css_path = 'css/';
)
I don't thing that various "media=print" CSS would be really usefull.
Of course you need a browser like Firefox / Mozilla to easily switch them, otherwise you have to take care of the stylesheets' switch directly in your pages [ see http://www.openweb.eu.org/ for example ].

--SergiO

CategoryDevelopment
There are 4 comments on this page. [Show comments]
Valid XHTML :: Valid CSS: :: Powered by WikkaWiki