Closed Bug 343564 Opened 18 years ago Closed 12 years ago

Create a css-style MW extension

Categories

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

Other
Other
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED INVALID

People

(Reporter: deb, Unassigned)

Details

I'd like a very basic MW extension that allows us to embed (and then use) CSS style rules on a per-page basis within the wiki.  The idea would be to avoid having to create seperate external "example" pages for CSS-related things (primarily the CSS reference).  The basic idea would be to allow the following in the wiki pages:

 <css-style>
 #example {
     line-height: normal;
 }
 </css-style>

which would then be properly output as:

 <style>
 #example {
     line-height: normal;
 }
 </style>

There are some possible restrictions that might be required, I'm just not entirely sure what those are.
We don't want to allow anything that loads an url, to start.  (Later, we might loosen that to permit relative URLs or something.)  We can likely just s/url/no-sorry/gi to get that, I'll camp a CSS Guru spawn.

People will probably abuse this, but we can cope with that as it happens.

Do we want the style rules to be restricted to a portion of the document (the example) or apply to the whole page?  The former is probably less error-prone, in which case we should probably call it "css-example" or something that makes it clear that it's not meant to be used to "just so" the presentation of an article or whatever.
> or something that makes it clear that it's not meant to be used to "just so" 
> the presentation of an article or whatever.

I think it should be possible (although not encouraged) to use this extension to change the formatting of an article. (See also bug 334225. That bug also mentions a MW extension called PageCSS.)
Mediawiki is gone. MindTouch is gone. No longer an issue we need to resolve with Kuma.
We currently use a template (https://developer.mozilla.org/en-US/docs/Template:CustomCSS) to add custom CSS classes to the site, which we can then use in our articles.
Status: NEW → RESOLVED
Closed: 12 years ago
Resolution: --- → INVALID
Component: Deki Infrastructure → Other
Product: developer.mozilla.org → developer.mozilla.org Graveyard
You need to log in before you can comment on or make changes to this bug.