[Pmwiki-users] %class=something%

Andres Yver yver
Thu Mar 4 06:16:48 CST 2004


On Thursday, March 4, 2004, at 06:59 AM, Nathan Jones wrote:

> Steven Leite wrote:
>> Uhm .. I'm no expert in css .. but, I think that's incorrect.
>> Anybody can type:  %define=myclass bgcolor=black color=green%
>
> Ah, I haven't been following any discussion about %define%, so I don't
> know what Pm is planning to implement in this regard.
>
> With CSS, classes can be defined in the <head> section of the HTML
> document (ie. they cannot be placed in the <body> with all the other
> content). I don't know enough about how PmWiki parses/processes pages 
> to
> say whether it can do this without major work.
>
> Anyway, what I primarily meant was: I can't imagine PmWiki being 
> extended
> such that external .css files could be edited in the same way as Wiki
> pages.

Ok, maybe i'm beating a dead horse here, but it seems to me that PmWiki 
is reaching a point where additional functionality is being added at 
the expense perhaps of usability.
Don't get me wrong?I'm amazed at how simple and powerful PmWiki is 
right now, and am all for extending functionality, but witness the last 
few discussions on just how to go about doing that and avoid difficult 
markup.

The easiest (for a lay-author) solution is to physically separate 
content from markup. This also what the w3.org people have been arguing 
for over the last , well, almost a decade now.

Wiki Authors want to write. They're not into having to go and read the 
relevant instruction or copy paste the right bit of code into the right 
place to make their page look the way they want. I'm sure that most of 
us who are wiki admins have had to repeatedly coach authors  through 
what to us is basic stuff.

If PmWiki could have %style=.foo% handle everything, authors would have 
an easier time.

If Edit.Sidebar were a list of styles, an author could place %% in 
their text, and then click on a style to assign it to their text.
the resulting markup would look like %%style=.mystyle%Author text here 
until closing style tag%

.mystyle is a link in Edit.Sidebar to a function that inserts 
'style=.mystyle%' at the cursor.

Custom styles, those other than the list defined by the wiki admin, 
could be defined in Edit.Sidebar by having a form input the style name 
into the Edit.Sidebar list as a link, and it's definition as inline css 
into the head of the generated html doc.

Only the author custom css should be inline with the document. We 
should still keep all the predefined styles and skin stuff as it is 
now, external css. This lets us use diff to revise unfortunate edits to 
Edit.Sidebar, and keeps our skins safe from catastrophic edits.

Edit.Sidebar would have to be a template which is in use for all pages 
which don't have custom style edits. Once a page has a custom style, 
then it has it's own associated $PageEdit.Sidebar.

andres




More information about the pmwiki-users mailing list