Steps to replicate the issue (include links if applicable):
What happens?:
The TOC is (forcibly?) displayed and is floated right (in non-Vector-2022).
What should have happened instead?:
At the least, it should not be floated right unless set to do so locally.
Software version (on Special:Version page; skip for WMF-hosted wikis like Wikipedia):
Other information (browser name/version, screenshots, etc.):
Caused by 189beaf2b4f13ca207df86eaa584edc697f6a3cf
The offending block is
.toc { float: right; margin: 0 0 1em 1em; }
I'd recommend prefixing .toc with .skin-apioutput as .skin-apioutput .toc but any other suitable class is fine.
I can't tell from the patch whether the API help always-display TOC change adjustment will impact live wiki pages but I'm guessing not. In case the change does force the TOC outside of the context of the API help, it should instead probably follow whatever the local skin's setting is.
I'd also suggest moving the relevant CSS, once appropriately limited to the API help "namespace", to the @media width block. Floating is rarely appropriate on smaller displays.
(I might also suggest changing the min-width to 640px while we're here since that's the current mobile token; dealer's choice on converting the file to LESS to use that token directly. But this one is probably worth testing to see if it feels good.)
