Last modified: 2014-10-10 18:07:07 UTC
Template:TOC limit does not work in mobile browsers that show the TOC by default. Example URL: http://en.m.wikipedia.org/w/index.php?title=Islamic_State_of_Iraq_and_the_Levant&oldid=628558101 Expected Results: Only level 2 heading shown (as is done on Desktop view) Actual Results: Headings are not limited in mobile view In source view it looks like: <div class="toclimit-2"></div> <div class="toc-mobile"> <h2 aria-controls=.... </div> Additional Builds and Platforms: Tried multiple mobile user agents on Firefox
Prioritization and scheduling of this bug is tracked on Trello card https://trello.com/c/5iungbbW
I'm pretty sure that it's because the appropriate rule is in [[:en:MediaWiki/Common.css]] but not in [[:en:MediaWiki/Mobile.css]]
Whoops. I meant [[:en:MediaWiki:Common.css]] and [[:en:MediaWiki:Mobile.css]]. Will Phabricator offer (a) a "preview" feature and (b) the ability to amend your own posts?
The table of contents in the mobile site is generated totally different from the desktop skin to give us more control to style it/position it appropriately for mobile/tablets. We currently do not support the css selectors that are used in Common.css and I'm not sure if we would want to. Thus marking as an enhancement for further consideration.
I'm not sure what the advantage of this is (or would be). The ToC is the basic element where the user can orient when reading the article, so why remove (maybe important and interesting) contents? Just my opinion :)
After discussing with other MobileFrontend developers we will not be adding classes to support this kind of thing. If you want to do this on a global basis you can already do .toc-mobile ul ul { display: none; } Doing this on a per template basis would be possible with the completion of https://www.mediawiki.org/wiki/Requests_for_comment/Allow_styling_in_templates but we won't be doing this as part of the MobileFrontend extension as we cannot guarantee we will maintain it.