Skip to content

Conversation

@bgravenorst
Copy link
Contributor

@bgravenorst bgravenorst commented Dec 2, 2025

Description

Fixes an issue where the Table of Contents (ToC) "On this page" section was getting hidden behind the sticky SubNavBar when scrolling on Embedded Wallets pages.

  • Updated the ToC selector to use [class*='tableOfContents'] for better CSS modules compatibility
  • Added a conditional CSS rule using :has() to increase the ToC offset only when the SubNavBar is present

Issue(s) fixed

Fixes #2545

Preview

https://metamask-docs-git-doc-2545-consensys-ddffed67.vercel.app/smart-accounts-kit

Checklist

  • If this PR updates or adds documentation content that changes or adds technical meaning, it has received an approval from an engineer or DevRel from the relevant team.
  • If this PR updates or adds documentation content, it has received an approval from a technical writer.

Note

Update ToC CSS to use a module-friendly selector and increase sticky offsets, with a conditional :has(SubNavBar) rule to prevent overlap.

  • Styles: ToC positioning (src/scss/theme/_toc.scss)
    • Use [class*='tableOfContents'] selector for CSS modules compatibility.
    • Increase sticky top offset to calc(var(--ifm-navbar-height) + 4rem).
    • Add conditional rule body:has([class*='subNavBar']) [class*='tableOfContents'] { top: calc(var(--ifm-navbar-height) + 9rem) } to clear the SubNavBar.

Written by Cursor Bugbot for commit c283271. This will update automatically on new commits. Configure here.

@bgravenorst bgravenorst requested review from a team as code owners December 2, 2025 22:53
@vercel
Copy link

vercel bot commented Dec 2, 2025

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Preview Comments Updated (UTC)
metamask-docs Ready Ready Preview Comment Dec 4, 2025 7:51am

Copy link
Member

@shahbaz17 shahbaz17 left a comment

Choose a reason for hiding this comment

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

lgtm

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

TOC hides under secondary nav on scroll

3 participants