I’m not sure whether this is a bug or a feature, but in any case it is a behaviour that (to my knowledge) is not documented and therefore not expectable. If I assign the CSS class nomobile to an element, either via TemplateStyles or via inline styles, it will not only be hidden in the mobile version of a wiki page, but even deleted entirely from the HTML source. Fine. But apparently this happens also if the class is called something-nomobile, as it happened to me recently when using TemplateStyles (per convention on deWP, I use a unique identifier before all my individual class names, in this case charts-, which is supposed to prevent such class conflicts)! According to my tests, somethingnomobile or nomobilesomething don’t cause any trouble, only the version with the hyphen is apparently equalised with the actual nomobile class. I feel like class names that only contain nomobile should never trigger this behaviour or is there any particular reason for it?
QA steps
Create a new page with the text
<div class="xe-nomobile">I should display on mobile (xe-nomobile)</div> <div class="nomobile">I should not display on mobile (nomobile) </div> <div class="not-navbox">I should display on mobile (not-navbox)</div> <div class="navbox">I should not display on mobile (navbox) </div>
Expected: In desktop all four elements should be visible. In mobile site only the two mobile elements should display
QA Results - Beta
AC | Status | Details |
---|---|---|
1 | ✅ | T231160#6349269 |
2 | ✅ | T231160#6349269 |
QA Results - Prod
AC | Status | Details |
---|---|---|
1 | ✅ | T231160#6363130 |
2 | ✅ | T231160#6363130 |