Last modified: 2013-09-29 16:49:14 UTC
Css counters could be added as an option. I've been using them for some time as user css, the code is on my user page, [[en:User:Zeimusu]]. They work pretty well with the monobook skin on most pages. A mechanism for not generating counters would be useful as certain pages, notably the current wikipedia main page, are not properly structured (no level 2 headings) and counters don't work well on those pages.
Use them for what?
Sorry, I didn't mention what I'm suggesting using counters for: For numbering headings - I currently number h2, h3 and h4.
So this is basically a suggestion for putting the section numbers inside a <div> or a <span> and then hide it/unhide it with CSS, thereby removing another user option from the parser output?
From what I read on your user page this seems not to be compatible with most browsers (except FF 1.1) at all. Or is it?
AEvar: No the suggestion is to use css counters. They are part of css 2.1. The only changes would be to the style sheet http://www.w3.org/TR/CSS21/generate.html#counters Michael: I believe that counters are currently supported by Safari and Opera. They will be in firefox 1.1 They are not supported by IE 6 or current versions of firefox. It seems possible that IE7 will support them too, but that of course is just speculation. I haven't done any testing with any other browser.
counters are supported in IE8+, and in all modern versions of modern browsers. So this is definitely an option.
(In reply to comment #3) > So this is basically a suggestion for putting the section numbers inside a <div> > or a <span> and then hide it/unhide it with CSS, thereby removing another user > option from the parser output? No, that would be an entirely different approach. This bug suggest not having them in HTML at all (just like we don't have the numbers for ordered lists in the HTML) and let CSS handle it. However, contrary to list numbers, css-counters for any element were introduced in CSS 2.1 aren't very widely supported, but its getting better. From what I can rather: IE 8+, FF 1.5+, Safari 3.1+, Chrome Opera is marked "Buggy", not sure what that means. Seems to be too narrow when laid against https://www.mediawiki.org/wiki/Compatibility#Browser
So.... instead of CSS counters this could also be done as a post-processing step the way that section edit links are done. (The parser outputs a stub <mw:editsection> element, and the output system replaces them with skin-specific links.)