CSS and Moin

Moin currently uses id= parameters in <div>s when generating HTML (XML?)

It also uses class= parameters.

Moin's behaviour (as of 1.2) is below.

(umm, some of this should go into HelpOnConfiguration/CascadingStyleSheets)

Discussion

Q: Why is id used sometime and class used other times?

A: id is used to identfy 'instances' in a document. You should have precisley 1 DOM element with a given id. A typical example is the pagetrail.
class on the other hand is used where multiple instances are expected. Each instance should be of the same class. A typical example is an <li> in the menu.

(I'm new to this so I'm probably wrong - consider this a 'strawman' and edit it :) -- DavidGreaves)

I propose that within the <body>:

Why?

always_ids:

sometimes_ids:

all other ids should be placed inside one of those above (?) extra_ids:

Behaviour (as at 1.2)

'''div id'''
Generating file
Use

content_id
Page.py:
??

message
PageEditor.py
??

preview
PageEditor.py
??

timings
request.py
??

pageinfo
wikiaction.py
??

not hardcoded
formatter/text_html.py
??

"Include_%s" % wikiutil.quoteWikiname(inc_page.page_name)
macro/Include.py
??

"RandomQuote_%s" % wikiutil.quoteWikiname(page.page_name)
macro/RandomQuote.py
??

"head-"+sha.new(title_text).hexdigest()+unique_id)
parser/wiki.py
??

logo
theme/classic.py
??

title
theme/classic.py
??

username
theme/classic.py
??

navibar
theme/classic.py
??

iconbar
theme/classic.py
??

message
theme/classic.py
??

pagetrail
theme/classic.py
??

footer
theme/classic.py
??

credits
theme/classic.py
??

trail
theme/viewonly.py
??

footer
theme/viewonly.py
??

credits
theme/viewonly.py
??

I have a patch to add the following to moin--main--1.2 and --1.3. I just need to know how to submit it.

'''div id'''
Generating file
Use

Action_fullsearch
wikiaction.py
??

Action_titlesearch
wikiaction.py
??

Action_diff
wikiaction.py
??

Action_info_general
wikiaction.py
??

Action_info_history
wikiaction.py
??

Action_info
wikiaction.py
??

Chat

MoinMoin: MoinMoinTodo/SkinPlugins/ThemeCssSpecification (last edited 2007-10-29 19:08:43 by localhost)