Description
Raised as an issue here: https://phabricator.wikimedia.org/T352930#9413982
Reprod:
- Make the browser very short
- Go to a page with a long TOC like https://test.wikipedia.org/w/index.php?title=BigDockedTOC&oldid=584288&useskin=vector-2022
- Make sure the TOC is collapsed into the dropdown next to the page title
- Open the TOC dropdown and scroll as far to the bottom you can in the dropdown
- Scroll down the page and see how some of the toc is cut off (i.e. missing "This is a sub-sub section 4"
Developer notes
This is happening because the styles for the dropdown max height are based off the full window height, but when the dropdown is in the page title at the top of the viewport, the header and banner will push the dropdown down a bit. We could account for this by reducing the height of the dropdown when its in the page title, but this would likely need JS to be completely accurate given the variable height of banners