I still think inline styles are going to continue causing problems on the mobile site as many people creating articles may only me thinking in terms of how a page will look in desktop rather than mobile. Although I personally would turn them off on the mobile website I seem to be in a minority.
I spoke to several people including Gabriel Wicke and Brion Vibber on this subject at the Berlin hackathon and I think possibly the best way we as a community can address this is to identify the problems on a case by case basis.
To do this I've created a page [1] the idea being that community members can report/identify situations where inline styles don't work on the mobile site, document them and provide a suggested resolution. These situations can then be linked to a list of effected pages that require cleaning up, for example [2]. These lists can be generated using Gabriel's dumpGrepper.js [3]. For the time being I've just run a grep on English Wikipedia but depending on whether this is successful I'll branch out to other languages
Hopefully this will result in some sort of reference page for how to write styles that work well on both mobile and desktop.
Please let me know if you do/don't think this is an effective way of solving the problem, watch the page and most importantly help contribute in the cleanup process!
[1] http://www.mediawiki.org/wiki/Making_MediaWiki_Mobile_Friendly [2] http://www.mediawiki.org/wiki/List_of_Problematic_portal_pages_with_two_colu... [3] https://gerrit.wikimedia.org/r/gitweb?p=mediawiki/extensions/VisualEditor.gi...
On Mon, May 14, 2012 at 3:57 AM, Krinkle krinklemail@gmail.com wrote:
On May 11, 2012, at 11:17 AM, Tei wrote:
On 11 May 2012 10:24, Ryan Kaldari rkaldari@wikimedia.org wrote:
What about this idea: We could introduce a new CSS class called 'nomobile' that functioned similarly to 'noprint' — any element set to this class would be hidden completely on mobile devices. If someone noticed a problem with a specific template on mobile devices, they could either fix the template or set it to 'nomobile'. This would make template creators aware of the problem and give them an incentive to fix their inline styles.
http://www.stuffandnonsense.co.uk/archives/images/specificitywars-05v2.jpg
I think theres a limitation to that, ".nomobile .darthvader .darthvader" will not work as expected (I think)
As far as CSS is concerned this will work just fine. Due to a logic error in the mobile site specifically it can fail sometimes. But CSS has no such bug or limitation, and in MediaWiki it will work just fine.
Not sure how that link is relevant..
-- Krinkle
Wikitech-l mailing list Wikitech-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/wikitech-l