mediawiki-skins-Vector/includes/templates/TableOfContents__line.mustache
Jon Robson 68239ae344 Use Codex for button styles, start transitioning icons to use Codex icon mixins
Changes:
- mw-ui-button to cdx-button
- mw-ui-quiet to cdx-button--weight-quiet
- mw-ui-icon-element to cdx-button--icon-only
- mw-ui-icon to vector-icon
- mw-ui-icon-flush-right/left to vector-button-flush-right/left
- Removes $isSmallIcon param in Hooks.php

85 Visual Changes
- ~36 changes from minor pixel changes from the new button classes in the main menu, language button
- 22 from standardizing the padding of the TOC in page title
- ~10 changes from addition of .cdx-button to the TOC toggle buttons

PERFORMANCE:
This will result in an overall increase of 2.7kb of render blocking
CSS, 1kb will be reclaimed when
I6c1ed1523df8cc9e2f2ca09506f12a595b8b013d is merged.

Co-author: Bernard Wang <bwang@wikimedia.org>
Bug: T336526
Change-Id: Ibd558238a41a0d3edb981e441638f9564f43d226
2023-06-12 16:26:28 -07:00

22 lines
1 KiB
Plaintext

<li id="toc-{{anchor}}"
class="vector-toc-list-item vector-toc-level-{{toclevel}}{{#is-top-level-section}}{{^vector-is-collapse-sections-enabled}} vector-toc-list-item-expanded{{/vector-is-collapse-sections-enabled}}{{/is-top-level-section}}">
<a class="vector-toc-link" href="#{{linkAnchor}}">
<div class="vector-toc-text">
<span class="vector-toc-numb">{{number}}</span>{{{line}}}</div>
</a>
{{#extensionData.DiscussionTools-html-summary}}
{{{.}}}
{{/extensionData.DiscussionTools-html-summary}}
{{#is-top-level-section}}{{#is-parent-section}}
<button aria-controls="toc-{{anchor}}-sublist" class="cdx-button cdx-button--weight-quiet cdx-button--icon-only vector-toc-toggle">
<span class="vector-icon vector-icon--x-small mw-ui-icon-wikimedia-expand"></span>
<span>{{{vector-button-label}}}</span>
</button>
{{/is-parent-section}}{{/is-top-level-section}}
<ul id="toc-{{anchor}}-sublist" class="vector-toc-list">
{{#array-sections}}
{{>TableOfContents__line}}
{{/array-sections}}
</ul>
</li>