Topic on Project:Support desk

Jump to navigation Jump to search

<div> and <span> tags around headers remove their collapsibility on the mobile skin

5
Jaywye (talkcontribs)

Is there a way around this? An example can be seen here.

I ran into this issue while attempting to create a mobile version of a page with different elements shown on desktop and mobile with the nodesktop and nomobile classes. I wanted to separate different sections with collapsed headers on mobile so that readers could expand whichever section they wanted to read, but found that the headers were not collapsible anymore.

This post was hidden by AhmadF.Cheema (history)
Jaywye (talkcontribs)

Thank you for your reply. Is there a reason why a collapsible mobile heading becomes uncollapsible when surrounded by <div>, <span>, or any other tags/attributes? https://i.imgur.com/vtznslm.png

AhmadF.Cheema (talkcontribs)

Probably a bug.

TheDJ (talkcontribs)

Such things break the section detection. (A header creates an 'implied' section, but if you start wrapping things, the implied sections no longer work and you are left with just the headings).

Reply to "<div> and <span> tags around headers remove their collapsibility on the mobile skin"