Mediawiki's TOC has a default toc class and id as "toc". In certain circumstances, it might be needed to manipulate this class and id by extensions to style the toc completely independent of the skin's styles.
An example use case can be the toc present here - https://en.wikivoyage.org/wiki/Canada
A feature could be added in core, to expose methods to set toc's id and class which would replace the default "toc".
Description
Description
Details
Details
Related Changes in Gerrit:
| Subject | Repo | Branch | Lines +/- | |
|---|---|---|---|---|
| Provide ability to customize the TOC title, id, and class | mediawiki/core | master | +104 -11 |
Related Objects
Related Objects
Event Timeline
Comment Actions
When using the default "toc" class or id for custom styling, often the existing styles on toc added by skin override, especially if one adds style by using $out->addModuleStyles().
For example, vector sets a non-zero margin on list elements of toc which take precedence even if one sets their margin to zero( in an extension ). I'll put up an example shortly.
Comment Actions
Change 884102 had a related patch set uploaded (by C. Scott Ananian; author: C. Scott Ananian):
[mediawiki/core@master] Provide ability to customize the TOC title, id, and class
Comment Actions
Change #884102 merged by jenkins-bot:
[mediawiki/core@master] Provide ability to customize the TOC title, id, and class