Closed Bug 334225 Opened 18 years ago Closed 12 years ago

CSS style rules for component stack diagrams, component block diagrams

Categories

(developer.mozilla.org Graveyard :: General, enhancement)

enhancement
Not set
normal

Tracking

(Not tracked)

RESOLVED INVALID

People

(Reporter: gekacheka, Unassigned)

References

Details

Attachments

(2 files)

Request:  Add CSS styles rules for component stack diagrams and component block diagrams to CSS for wikis (see patch forthcoming).

Background:

The calendar project is moving its developer documentation pages to wiki.mozilla.org.  Page(s) are to include component stack diagrams and component block diagrams constructed from HTML tables.  (Unlike images, HTML tables are easily editable, searchable, and linkable, and can reflow text to fit window).  

The HTML diagrams use CSS style rules to consistently style the many cells.
(The diagrams would be unmaintainable if the CSS had to be duplicated on every cell, obfuscating the content and making style difficult to keep consistent.)

Unlike html pages, Wikicode does not permit <head> elements:  
Wikicode does not permit <style>...</style>, so it is not possible to include the style rules within a wiki page.  
Wikicode does not permit <link>, so it is not possible to link to an external stylesheet.  

The remaining option seems to be to add the style rules to a global stylesheet that the page already uses, such as mozilla-org/wiki/skins/cavendish/main.css
(maybe patch -l -p 2 -i file.patch)

Adds style rules for component-block-diagrams and component-stack-diagrams to (mozilla-org/) wiki/skins/cavendish/main.css since style rules cannot be added to individual pages (<style> and <link> don't work in wikicode).  See previous attachment for draft samples of use (in html).
Attachment #218590 - Flags: review?(shaver)
FWIW, I don't like the idea of adding page-specific CSS to common css files, this doens't scale. If possible we should install something like PageCSS mediawiki extension instead.
Blocks: 316213
(In reply to comment #0)
> The calendar project is moving its developer documentation pages to
> wiki.mozilla.org.

Ok, you're confused somewhere because wiki.mozilla.org != developer.mozilla.org.
They are two completely different things (including two completely different CVS modules holding the wiki files).

This Bugzilla product is for developer.mozilla.org. If you wish for something to be on wiki.mozilla.org, then this bug should be under "Websites :: *.mozilla.org" or "mozilla.org :: Server Operations" (for the addition of the css files).

Which one do you mean?
I assume we're talking about http://www.mozilla.org/projects/calendar/dev_guide.html

We don't have a clear policy on what is allowed on devmo, so some input from dria and others would be welcome here, I guess. I prefer putting these on devmo.
I agree doubly with Nickolay:

- this content should be on MDC
- we should install a PageCSS-like extension rather than bloat the universal CSS files with page-specific rules
Both wikis should use the same solution for CSS rules if possible.  One use would be so new feature content can be proposed and drafted on wiki.mozilla.org and easily migrated to the developer.mozilla.org wiki if/when it is implemented, accepted, and released.

MediaWiki PageCSS:  A quick web search didn't turn up any documentation on PageCSS --- does it implement stylesheets in wiki, or only inline CSS rules?  (Diagrams may appear on more than one page, so prefer a solution that supports stylesheets as well as in-page css.)
Comment on attachment 218590 [details] [diff] [review]
Adds style rules for component-block-diagram, component-stack-diagram

r= on this, we need to figure out the CSS story.
Attachment #218590 - Flags: review?(shaver) → review-
PageCSS requires MediaWiki from CVS, so that won't solve things for us in the near term.  Cc:ing Deb here for her thoughts.
Would these styles really not be of any use to anyone else doing similar diagrams in the wikis?  If they're absolutely task-specific then adding them to the regular CSS would be suboptimal, but if they might be more generally useful having them in the CSS would be OK. 

On the other hand, an extension like PageCSS would be useful for truly page-specific styles (of which we already have a few embedded via style= tags).

(In reply to comment #9)
> PageCSS requires MediaWiki from CVS

(Hmm, sounds like an ever-receding target... :)  Here's a start at finding more specific requirements.

Recent versions of PageCSS source in SVN say it needs PHP 5.1, Mediawiki 1.6alpha.   
http://svn.wikimedia.org/viewvc/mediawiki/trunk/extensions/PageCSS/PageCSS.php?view=log

MediaWiki 1.6 has been out for a while and is running on wiki.mozilla.org, but on an older PHP.

For reference, as I write this,
  mozilla documentation center is running PHP 4.3.9, MW 1.5.6
  http://developer.mozilla.org/en/docs/Special:Version

  mozilla wiki                 is running PHP 4.3.9, MW 1.6.3
  http://wiki.mozilla.org/Special:Version

Depends on: 358637
Component: Deki Infrastructure → Other
Automatically closing all bugs that have not been updated in a while. Please reopen if this is still important to you and has not yet been corrected.
Status: NEW → RESOLVED
Closed: 12 years ago
Resolution: --- → INVALID
Product: developer.mozilla.org → developer.mozilla.org Graveyard
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: