Last modified: 2013-09-29 16:49:14 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T4366, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 2366 - Use CSS counter properties for numbering sections, reducing parser cache fragmentation
Use CSS counter properties for numbering sections, reducing parser cache frag...
Status: NEW
Product: MediaWiki
Classification: Unclassified
Parser (Other open bugs)
1.18.x
All All
: Low enhancement with 1 vote (vote)
: ---
Assigned To: Nobody - You can work on this!
:
Depends on:
Blocks: css 28424
  Show dependency treegraph
 
Reported: 2005-06-10 00:35 UTC by James Kilfiger
Modified: 2013-09-29 16:49 UTC (History)
1 user (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments

Description James Kilfiger 2005-06-10 00:35:17 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.
Comment 1 Brion Vibber 2005-06-10 00:40:28 UTC
Use them for what?
Comment 2 James Kilfiger 2005-06-10 15:59:59 UTC
Sorry, I didn't mention what I'm suggesting using counters for:

For numbering headings - I currently number h2, h3 and h4. 
Comment 3 Ævar Arnfjörð Bjarmason 2005-06-10 16:10:49 UTC
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?
Comment 4 Michael Keppler 2005-06-10 17:44:54 UTC
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?
Comment 5 James Kilfiger 2005-06-12 08:31:19 UTC
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.
Comment 6 Happy-melon 2011-03-30 22:55:14 UTC
counters are supported in IE8+, and in all modern versions of modern browsers.  So this is definitely an option.
Comment 7 Krinkle 2011-12-30 19:13:03 UTC
(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
Comment 8 Brion Vibber 2013-09-29 16:49:14 UTC
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.)

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links