Page MenuHomePhabricator

Allow manipulation of Table Of Content's class and id
Closed, DuplicatePublic


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 -
A feature could be added in core, to expose methods to set toc's id and class which would replace the default "toc".

Event Timeline

Sumit created this task.Jul 10 2015, 5:04 PM
Sumit raised the priority of this task from to Needs Triage.
Sumit updated the task description. (Show Details)
Sumit added a project: MediaWiki-General.
Sumit added subscribers: Sumit, Jdlrobson.
Restricted Application added a subscriber: Aklapper. · View Herald TranscriptJul 10 2015, 5:04 PM

Isn't it possible for you to use core's "toc" class/id?

Sumit added a comment.EditedJul 14 2015, 3:58 PM

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.

Aklapper triaged this task as Lowest priority.Jul 15 2015, 11:22 PM
Ricordisamoa updated the task description. (Show Details)Jul 22 2015, 7:56 PM
Ricordisamoa set Security to None.
Ricordisamoa added a subscriber: Ricordisamoa.
Feldo added a subscriber: Feldo.Jan 8 2016, 9:30 PM