Skip to content

Conversation

@Eetwalt
Copy link
Collaborator

@Eetwalt Eetwalt commented Jan 12, 2026

Summary

Closes #6964

Proposed solution:
Widen the CSS selector that hides the TOC headings so it looks up any TOC inside the body, not just inside the toclimit classes.

How did you test this change?

Dev tools

@Eetwalt Eetwalt added the stylesheets Changes to stylesheets label Jan 12, 2026
@Eetwalt Eetwalt marked this pull request as ready for review January 14, 2026 08:52
Copilot AI review requested due to automatic review settings January 14, 2026 08:52
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR fixes the TOClimit functionality on pages where the TOC is rendered outside of the wrapper containing the __TOC__ magic word, such as when emitted by a module (e.g., entity matchticker). The fix uses the :has() CSS pseudo-class to apply TOC hiding rules based on the presence of toclimit classes anywhere in the body, rather than requiring the TOC to be nested directly within those classes.

Changes:

  • Updated CSS selectors to support TOC limiting when TOC is rendered outside the toclimit wrapper
  • Added explanatory comment documenting the MediaWiki TOC rendering edge case

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@Eetwalt Eetwalt merged commit 86ef07f into main Jan 14, 2026
@Eetwalt Eetwalt deleted the toclimit-fix branch January 14, 2026 09:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

stylesheets Changes to stylesheets

Projects

None yet

Development

Successfully merging this pull request may close these issues.

TOClimit not functional below infobox league

3 participants