2017-10-21

Missing navigation panes in Apple developer documentation

Apple developer documentation used to show a table of contents in a sidebar. At some point, it went away. However, if you search online with Firefox, the online versions still show the extra navigation areas. What is going on there? I looked at the page source today and noticed that the missing navigation links were wrapped in header and nav elements. Firefox shows them but Safari does not. Hmmm...

Safari has a menu item Develop > Disable Styles. This works in a brute force way. The table of contents tree appears at the top of the page. All other styles (fonts and layout) disappear from the page though. But at least it shows that Safari recognizes and can display those elements. So why is it hiding them?

If you choose Develop > Show Web Inspector, choose the Elements tab, and click Styles in the right sidebar, you will find the culprits. The page header references four stylesheets, and two of them (xcode5.css and xcode4.css) have unexpected rules. For #tocContainer.isShowingToc they have "display:none" and for #contents.isShowingToc they have "left: 0". If you comment out both rules in both files, the page displays closer to past versions.

If you have XCode 6 why would you need stylesheets for XCode 4 or 5? Find the directory containing those files and remove or rename them. The table of contents will display properly again! How sweet it is! On my system XCode saved the files in: