bugzilla.mozilla.org has resumed normal operation. Attachments prior to 2014 will be unavailable for a few days. This is tracked in Bug 1475801.
Please report any other irregularities here.

Create a css-style MW extension

RESOLVED INVALID

Status

developer.mozilla.org
General
RESOLVED INVALID
12 years ago
6 years ago

People

(Reporter: dria, Unassigned)

Tracking

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.

Comment 2

12 years ago
> 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
Last Resolved: 6 years ago
Resolution: --- → INVALID
(Assignee)

Updated

6 years ago
Component: Deki Infrastructure → Other
Product: Mozilla Developer Network → Mozilla Developer Network
You need to log in before you can comment on or make changes to this bug.